Skip to content

Commit f1b5071

Browse files
committed
A more precise targetting of elements.
Problem: If you have "li" in an elements, when you click on it, you'll have an error (no tabs will be displayed). Solution: Targetting the "li" with the child selectors (">").
1 parent 00851b7 commit f1b5071

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.tabslet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
_tabs.each(function() { _cache_div.push($(this).css('display')); });
7171

7272
// Autorotate
73-
var elements = $this.find('> ul li'), i = options.active - 1; // ungly
73+
var elements = $this.find('> ul > li'), i = options.active - 1; // ungly
7474

7575
if ( !$this.data( 'tabslet-init' ) ) {
7676

@@ -242,4 +242,4 @@
242242

243243
$(document).ready(function () { $('[data-toggle="tabslet"]').tabslet(); });
244244

245-
})(jQuery);
245+
})(jQuery);

0 commit comments

Comments
 (0)