1/* 2 * Ïëàãèí: TTabs (Test-Templates Tabs) 3 * Íàçíà÷åíèå: Ñîçäàíèå íåîãðàíè÷åííîãî ÷èñëà âêëàäîê íà ñàéòå 4 * Âåðñèÿ: 2.0 5 * Äëÿ àêòèâàöèè â êîäå ñàéòà íóæíî âñòàâèòü êîä jquery: $('ñåëåêòîð').ttabs(); 6 * ãäå â ðîëè ñåëåêòîðà ìîæåò âûñòóïàòü êëàññ, id èëè ëþáîé äðóãîé ñåëåêòîð jquery 7 * .active-ttab - êëàññ àêòèâíîé âêëàäêè 8 * 9 * 10*/ 11 12jQuery.fn.ttabs = function(options){ 13 14 var options = jQuery.extend({ 15 16 activeClass: 'active-ttab' // Êëàññ àêòèâíîé âêëàäêè 17 18 },options); 19 20 return this.each(function() { 21 22 $(this).find('.tt-panel:first').show(0); 23 $(this).find('.tabstitle span:first').addClass(options.activeClass); 24 25 $(this).find('.tabstitle span').click( 26 function() { 27 $(this).parent().parent().find('.index-panel .tt-panel').hide(0); 28 var numEl= $(this).index(); 29 $(this).parent().parent().find('.index-panel .tt-panel').eq(numEl).show(); 30 $(this).parent().find('span').removeClass(options.activeClass); 31 $(this).addClass(options.activeClass); 32 } 33 ); 34 35 }); 36 37};
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.