diff --git a/jquery.tabslet.js b/jquery.tabslet.js index 26df420..b197fab 100644 --- a/jquery.tabslet.js +++ b/jquery.tabslet.js @@ -174,26 +174,6 @@ } - function deep_link() { - - var ids = []; - - elements.find('a').each(function() { ids.push($(this).attr($this.opts.attribute)); }); - - var index = $.inArray(location.hash, ids) - - if (index > -1) { - - return index + 1 - - } else { - - return ($this.data('active') || options.active) - - } - - } - var move = function(direction) { if (direction == 'forward') i = ++i % elements.length; // wrap around @@ -241,6 +221,21 @@ }; + function deep_link() { + + var ids = []; + + elements.find('a').each(function() { ids.push($(this).attr($this.opts.attribute)); }); + + var index = $.inArray(location.hash, ids); + + if (index > -1) { + return index + 1 + } else { + return ($this.data('active') || options.active) + } + } + $(document).ready(function () { $('[data-toggle="tabslet"]').tabslet(); }); })(jQuery);