nikki / LiteAccordion

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

Bug when linkable:true is enabled #60

Closed grabbou closed 11 years ago

grabbou commented 12 years ago

When linkable option is set to true, and we navigate to the last slide (let's say its 5th slide), and then, we try to navigate to the 4th slide, the 5th slide is beign slided with the 4th slide and 3rd slide is being displayed instead of 4th slide. This seems to be a bug also in demo page with links enabled.

alexvee commented 12 years ago

I've found I have the same issue, and it does seem to be only when linkable is set to true.

It even happens on the demo site under More Examples: http://nicolahibbert.com/demo/liteAccordion/

relentlesslyLearning commented 11 years ago

I can repro this when Linkable set to true and calling the prev/next methods too.

nikki commented 11 years ago

Will look into it, thanks.

rafa8626 commented 11 years ago

The answer is to remove call() from this line: core.animSlide.call(tab); and change it to: core.animSlide(tab);

The call method is causing that the param tab goes undefined into animSlide method and it goes directly into this condition:

settings.onSlideAnimComplete.call(triggerTab ? triggerTab.next : _this.prev.next());

That's why the slider always goes to the previous one