I'm currently implementing this accordion on a site and I was curious how I'd be able to use a bootstrap navbar containing links that would control the opening and closing of them instead of clicking on the panel itself.
I feel like it would be pretty simple but not sure how to integrate it into your js file.
I've attached a screenshot showing what I'm referring to.
I've also attached the following jquery i have written, but there are bugs in this. It takes two clicks to open the panel, and it also isn't dynamic as I've set the panel to open.
function expandPanelBar(title) { //accordion $("#" + title + " a").on('click', function (event) { $('#accordion #accordion-0_tab').focus().click(); $("html, body").animate({ scrollTop: $("#anchor_" + title + "").offset().top }, 1000); }); }
I feel like it would be great if somehow I could tap into the clickButtonEventHandler on line 113 for the panels.
Hello,
I'm currently implementing this accordion on a site and I was curious how I'd be able to use a bootstrap navbar containing links that would control the opening and closing of them instead of clicking on the panel itself.
I feel like it would be pretty simple but not sure how to integrate it into your js file.
I've attached a screenshot showing what I'm referring to.
I've also attached the following jquery i have written, but there are bugs in this. It takes two clicks to open the panel, and it also isn't dynamic as I've set the panel to open.
function expandPanelBar(title) { //accordion $("#" + title + " a").on('click', function (event) { $('#accordion #accordion-0_tab').focus().click(); $("html, body").animate({ scrollTop: $("#anchor_" + title + "").offset().top }, 1000); }); }
I feel like it would be great if somehow I could tap into the clickButtonEventHandler on line 113 for the panels.
Thanks!