-
Notifications
You must be signed in to change notification settings - Fork 298
Open
Description
Hello again!
Thanks for the great plugin. I've found an issue with version 3.8.2, specifically with the hideCurrent option. It doesn't work correctly on the official example, so I'm confident this isn't an artifact of my implementation.
I think I've found the culprit, starting on line 1563:
if(self.options.hideCurrent) {
activeElem.hide().promise().done(function () {
self.listItems.show();
});
}
After activeElem is hidden, the Promise returns and all of the listItems (including activeElem) are shown. This renders the hideCurrent option inoperative.
One way to fix this issue is to simply compare each list item against activeElem, and only show the item if they are not equal.
if (self.options.hideCurrent) {
activeElem.hide().promise().done(function () {
self.listItems.each(function() {
if (!$(this).is(activeElem)) {
$(this).show();
}
});
});
}
Hope this helps!
arturkim
Metadata
Metadata
Assignees
Labels
No labels