nikki / LiteAccordion

A lightweight horizontal accordion plugin for jQuery.
MIT License
224 stars 130 forks source link

links vs. autoplay #38

Closed cvc1968 closed 12 years ago

cvc1968 commented 12 years ago

Unless I'm missing something, it seems that setting autoplay to 'true' breaks linkables. Is there any way to have an accordion autoplay but still have the links work? In my mind I can sort of see something involving the stop and play methods used on the links, and I may give that a try, but thought I would see if you already had a solution to this. Thanks

cvc1968 commented 12 years ago

OK, yeah, it was actually easier than I thought it would be. This did the trick:

$("#mylinks a").hover(function() {
        $('#myaccordion').liteAccordion('stop');
    },function() {
        $('#myaccordion').liteAccordion('play');
});
nikki commented 12 years ago

This was a design decision. Imagine: you land on a page from Google, it has an autoplaying accordion on it. You let it play for a few slides, but the site isn't what you're looking for and you hit the back button. You'd have to hit back a whole bunch of times to page through all the slides that have been autoplaying - pretty annoying.