Reputation: 131
I need to change the accordion elements dynamically, while clicking click Here to next accordion
button need to activate next accordion elements. But I tried many ways doesn't work anything. Can you please suggest me?
$('.collapsible').collapsible();
$('.next-accordion').on('click', function(){
$('#scondId').click();
$('#scondId').trigger('click');
});
Upvotes: 2
Views: 924
Reputation: 74738
Instead of triggering it on li
's id trigger it on the child element:
$('#scondId > div').click();
Upvotes: 1