PageSourceSearch

https://pcelectric.at/tradepro/shopen/appserv/jscript/easyResponsiveTabs.js

js pcelectric.at collected 2026-10-01 01:34:41 UTC 4,581 bytes, 15 lines download raw bytes

1// Easy Responsive Tabs Plugin
2// http://webtrendset.com/demo/easy-responsive-tabs/Index.html
3// Author: Samson.Onna <Email : [email protected]>
4(function($){$.fn.extend({easyResponsiveTabs:function(options){var defaults={type:'default',width:'auto',fit:true,closed:false,activate:function(){}}
5var options=$.extend(defaults,options);var opt=options,jtype=opt.type,jfit=opt.fit,jwidth=opt.width,vtabs='vertical',accord='accordion';var hash=window.location.hash;var historyApi=!!(window.history&&history.replaceState);$(this).bind('tabactivate',function(e,currentTab){if(typeof options.activate==='function'){options.activate.call(currentTab,e)}});this.each(function(){var $respTabs=$(this);var $respTabsList=$respTabs.find('ul.resp-tabs-list');var respTabsId=$respTabs.attr('id');$respTabs.find('ul.resp-tabs-list li').addClass('resp-tab-item');$respTabs.css({'display':'block','width':jwidth});$respTabs.find('.resp-tabs-container > div').addClass('resp-tab-content');jtab_options();function jtab_options(){if(jtype==vtabs){$respTabs.addClass('resp-vtabs');}
6if(jfit==true){$respTabs.css({width:'100%',margin:'3em 0 2em 0'});}
7if(jtype==accord){$respTabs.addClass('resp-easy-accordion');$respTabs.find('.resp-tabs-list').css('display','none');}}
8var $tabItemh2;$respTabs.find('.resp-tab-content').before("<h2 class='resp-accordion' role='tab'><span class='resp-arrow'></span></h2>");var itemCount=0;$respTabs.find('.resp-accordion').each(function(){$tabItemh2=$(this);var $tabItem=$respTabs.find('.resp-tab-item:eq('+itemCount+')');var $accItem=$respTabs.find('.resp-accordion:eq('+itemCount+')');$accItem.append($tabItem.html());$accItem.data($tabItem.data());$tabItemh2.attr('aria-controls','tab_item-'+(itemCount));itemCount++;});var count=0,$tabContent;$respTabs.find('.resp-tab-item').each(function(){$tabItem=$(this);$tabItem.attr('aria-controls','tab_item-'+(count));$tabItem.attr('role','tab');var tabcount=0;$respTabs.find('.resp-tab-content').each(function(){$tabContent=$(this);$tabContent.attr('aria-labelledby','tab_item-'+(tabcount));tabcount++;});count++;});var tabNum=0;if(hash!=''){var matches=hash.match(new RegExp(respTabsId+"([0-9]+)"));if(matches!==null&&matches.length===2){tabNum=parseInt(matches[1],10)-1;if(tabNum>count){tabNum=0;}}}
9$($respTabs.find('.resp-tab-item')[tabNum]).addClass('resp-tab-active');if(options.closed!==true&&!(options.closed==='accordion'&&!$respTabsList.is(':visible'))&&!(options.closed==='tabs'&&$respTabsList.is(':visible'))){$($respTabs.find('.resp-accordion')[tabNum]).addClass('resp-tab-active');$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active').attr('style','display:block');}
10else{$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active resp-accordion-closed')}
11$respTabs.find("[role=tab]").each(function(){var $currentTab=$(this);$currentTab.click(function(){var $currentTab=$(this);var $tabAria=$currentTab.attr('aria-controls');if($currentTab.hasClass('resp-accordion')&&$currentTab.hasClass('resp-tab-active')){$respTabs.find('.resp-tab-content-active').slideUp('',function(){$(this).addClass('resp-accordion-closed');});$currentTab.removeClass('resp-tab-active');return false;}
12if(!$currentTab.hasClass('resp-tab-active')&&$currentTab.hasClass('resp-accordion')){$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');$respTabs.find('.resp-tab-content-active').slideUp().removeClass('resp-tab-content-active resp-accordion-closed');$respTabs.find("[aria-controls="+$tabAria+"]").addClass('resp-tab-active');$respTabs.find('.resp-tab-content[aria-labelledby = '+$tabAria+']').slideDown().addClass('resp-tab-content-active');}else{$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');$respTabs.find('.resp-tab-content-active').removeAttr('style').removeClass('resp-tab-content-active').removeClass('resp-accordion-closed');$respTabs.find("[aria-controls="+$tabAria+"]").addClass('resp-tab-active');$respTabs.find('.resp-tab-content[aria-labelledby = '+$tabAria+']').addClass('resp-tab-content-active').attr('style','display:block');}
13$currentTab.trigger('tabactivate',$currentTab);if(historyApi){var currentHash=window.location.hash;var newHash=respTabsId+(parseInt($tabAria.substring(9),10)+1).toString();if(currentHash!=""){var re=new RegExp(respTabsId+"[0-9]+");if(currentHash.match(re)!=null){newHash=currentHash.replace(re,newHash);}
14else{newHash=currentHash+"|"+newHash;}}
15else{newHash='#'+newHash;}}});});$(window).resize(function(){$respTabs.find('.resp-accordion-closed').removeAttr('style');});});}});})(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.