1 2function responsiveTabs(parentId, parentClass){ 3 var tabsContainer = jQuery(parentId).find('ul:first'); 4 var widthOfTabs = jQuery(parentId).attr('data-width'); 5 /* display: none problem ... the .tabs-wrapper is always hidden, so we wont get actual size */ 6 jQuery(parentId).find('.tabs-wrapper').show().css({'opacity': 0}); 7 var wrapperWidth = jQuery(parentId).find('.tabs-wrapper').width(); 8 jQuery(parentId).find('.tabs-wrapper').hide().css({'opacity': ''}); 9 /* display: none problem ... the .tabs-wrapper is always hidden, so we wont get actual size */ 10 if(widthOfTabs >= wrapperWidth || isResponsive(640)){ 11 jQuery(parentId).removeClass( parentClass ); 12 13 tabsContainer.parent().addClass('responsive-tabs'); 14 tabsContainer.addClass('responsive-tabs').hide(); 15 tabsContainer.parent().find('.selected').html(tabsContainer.find('.ait-tabs-active a').text()).show(); 16 17 /*tabsContainer.parent().find('.selected').toggle(function(){ 18 tabsContainer.stop(true, true).slideDown(); 19 tabsContainer.parent().addClass('toggle-opened'); 20 },function(){ 21 tabsContainer.stop(true, true).slideUp(); 22 tabsContainer.parent().removeClass('toggle-opened'); 23 });*/ 24 25 if(tabsContainer.parent().hasClass('responsive-tabs-click') == false){ 26 tabsContainer.parent().find('.selected').on('click', function(){ 27 if(tabsContainer.parent().hasClass('toggle-opened')){ 28 tabsContainer.stop(true, true).slideUp(400, function(){ 29 tabsContainer.parent().removeClass('toggle-opened'); 30 }); 31 } else { 32 tabsContainer.stop(true, true).slideDown(400, function(){ 33 tabsContainer.parent().addClass('toggle-opened'); 34 }); 35 } 36 }); 37 tabsContainer.parent().addClass('responsive-tabs-click'); 38 } 39 40 /* new functionality for responsive */ 41 // display select instead of rendered tabs dropdown 42 tabsContainer.parent().hide(); // hide the tabs 43 jQuery(parentId).find('select.responsive-tabs-select').show(); 44 /* new functionality for responsive */ 45 } else { 46 jQuery(parentId).addClass( parentClass ); 47 48 tabsContainer.parent().removeClass('responsive-tabs'); 49 tabsContainer.removeClass('responsive-tabs').show(); 50 tabsContainer.parent().find('.selected').unbind('click').hide(); 51 52 /* new functionality for responsive */ 53 // display select instead of rendered tabs dropdown 54 tabsContainer.parent().show(); // hide the tabs 55 jQuery(parentId).find('select.responsive-tabs-select').hide(); 56 /* new functionality for responsive */ 57 } 58 tabsContainer.children('li').click(function(){ 59 jQuery(this).parent().parent().find('.selected').html(jQuery(this).find('.ui-tabs-anchor').text()).click(); 60 }); 61 62 /* new functionality for responsive */ 63 /*jQuery(parentId).find('select.responsive-tabs-select').on('change', function(){ 64 var $selected = jQuery(this).find('option:selected'); 65 tabsContainer.find('a[href="'+$selected.val()+'"]').trigger('click'); 66 });*/ 67 /* new functionality for responsive */ 68} 69 70function tabsWidth(parentId, parentClass){ 71 var result = 0; 72 if(parentClass == "ait-tabs-horizontal"){ 73 var tabsWidth = 0; 74 jQuery(parentId).find('ul.ait-tabs-nav').children('li').each(function(){ 75 tabsWidth = tabsWidth + jQuery(this).outerWidth(true); 76 }); 77 result = tabsWidth; 78 } else { 79 result = 0; 80 } 81 jQuery(parentId).attr('data-width', result); 82} 83 84function tabsHover(parentId, parentClass){ 85 var span = "<span class='ait-tab-hover'>{text}</span>"; 86 jQuery(parentId).find('ul.ait-tabs-nav').children('li').each(function(){ 87 var text = jQuery(this).children('a').text(); 88 jQuery(this).append(span.replace('{text}', text)); 89 var cont = jQuery(this).find('.ait-tab-hover'); 90 cont.attr({'data-twidth' : jQuery(this).find('.ait-tab-hover').outerWidth(true)}); 91 cont.css({'width' : '10%'}); 92 cont.click(function(){ 93 jQuery(this).parent().find('a').click(); 94 }); 95 96 jQuery(this).hover(function(){ 97 cont.css({'width' : cont.data('twidth')}); 98 }, function(){ 99 cont.css({'width' : "10%"}); 100 }); 101 }); 102}
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.