vendor/assets/javascripts/foundation/jquery.foundation.tabs.js in zurb-foundation-3.0.8.rc1 vs vendor/assets/javascripts/foundation/jquery.foundation.tabs.js in zurb-foundation-3.0.8

- old
+ new

@@ -1,13 +1,13 @@ (function ($) { - + $.fn.foundationTabs = function (options) { - + var settings = $.extend({ callback: $.noop }, options); - + var activateTab = function ($tab) { var $activeTab = $tab.closest('dl').find('dd.active'), contentLocation = $tab.children('a').attr("href") + 'Tab'; // Strip off the current url that IE adds @@ -19,18 +19,18 @@ //Show Tab Content $(contentLocation).closest('.tabs-content').children('li').removeClass('active').hide(); $(contentLocation).css('display', 'block').addClass('active'); }; - - $('dl.tabs dd a', this).on('click.fndtn', function (event){ + + $(document).on('click.fndtn', 'dl.tabs dd a', function (event){ activateTab($(this).parent('dd')); }); - + if (window.location.hash) { activateTab($('a[href="' + window.location.hash + '"]').parent('dd')); settings.callback(); } - + }; })(jQuery); \ No newline at end of file