1; 2(function($){ 3 $.fn.extend({ 4 jsmart_moduletabs: function(options){ 5 var defaults = {}; 6 var options = $.extend(defaults, options); 7 8 return this.each(function(){ 9 var tabs = $('.tabs-container ul.tabs li', this); 10 var contents = $('.tabs-content div.tab-content', this); 11 12 // preset fx height 13// contents.each(function(){ 14// if( $('.ajax_loading', this) ){ 15// $(this).data('fx2height', $(this).height()); 16// } 17// }); 18 19 var ua = navigator.userAgent, 20 event = (ua.match(/iPad/i)) ? "touchstart" : "click"; 21 tabs.bind(event, function(i){ 22 if ( $('.tab', this).hasClass('selected') ){ 23 return; 24 } 25 var index = tabs.index(this); 26 // tab change 27 $('.tab', tabs).removeClass('selected'); 28 $('.tab', this).addClass('selected'); 29 30 // content change 31 var content2s = contents.get(index); 32 33// if ($(content2s).data('fx2height')){ 34// var fx2height = $(content2s).data('fx2height'); 35// $(content2s).parent().animate({height: fx2height}, 200); 36// } 37 38 contents 39 .filter('.selected') 40 .removeClass('selected') 41 //.css({display: 'none'}) 42 ; 43 contents 44 .filter(content2s) 45 .addClass('selected') 46 //.fadeIn(400) 47 ; 48 49// if (options.ajaxUpdate){ 50// options.ajaxUpdate.apply(contents.filter(content2s), [contents.filter(content2s), options]); 51// } 52 }); 53 }); 54 } 55 }); 56})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.