/* * Author : Fbolaji * date: 23-07-2014 * description: ajax tab -to load other future vehicle content via AJAX * tabbified plugin in EP2/ENGInE/script/core.js */ var EP2 = EP2 || {}; //Used by blue hive flash !function($, window, document, undefined) { var location = window.history.location || window.location; EP2.midPageTabContent = function(){ var $tabs = $('#fv-inner-tabs.tabs li'), $list ="", $backtotopsiteTerm = $('.nameplate-tab-content').attr('data-siteterm-backtotop'), $tabLen = $tabs.size() - 1; if($tabLen > 0){ $('.tab-wrapper').append('
'); for(var i=0; i < $tabLen; i++ ){ $list += '
'; }; $('.mid-page-content').append($list); $('#fv-wrapper').tabbifiedContent({ navEle : '.tabs li a', tabPanelSelector : '#fv-wrapper .mid-page-content .tab-content', selectedTabLink : 0, tabNavEvent : 'click', hiAjax :{'enable':true, 'targetEle':'.tab-content'}, backtoTopSiteTerm:$backtotopsiteTerm, animateTo: 596, dockTabMenu:true, dockTabEleSelector:'.tab-wrapper:first', afterTabSelected:function(){ $('#fv-inner-tabs li a').on('click',function(e){ e.preventDefault(); var selectedTab = $('#fv-inner-tabs.tabs li.selected'); $(selectedTab).removeClass('selected'); $(this).closest('li').addClass('selected'); if( $(this).closest('.tab-wrapper').hasClass('sticky-tab-menu') == true){ //alert('true'); $('.sub-nav.open').addClass('sticky-sub-tab'); } }); } }); } }; EP2.midPageTabContent(); }(jQuery, window, document);