') } if (width <= 480 && jQuery('.elementor-hidden-phone').length > 1) { jQuery('.elementor-hidden-phone').eq(0).remove(); } else { //code for other devices } if (width <= 480 && jQuery('.carousel-inner').text().trim() ==""){ jQuery(".shop-page-v9-slider").addClass("alter-slider-remove"); jQuery(".store-slider-outer").addClass("alter-slider-remove"); } if (jQuery('.carousel-inner').children().length == 0){ jQuery(".shop-page-v9-slider").addClass("alter-slider-remove"); } var initial_url = window.location.href; var url = initial_url .split( '/' ); var updated_url= "https://"+document.location.hostname + '/' + url[ url.length - 5 ] + '/' + url[ url.length - 4 ]+ '/' + url[ url.length - 3 ]+"/"; var paginated_url = "https://"+document.location.hostname + '/' + url[ url.length - 7 ] + '/' + url[ url.length - 6]+ '/' + url[ url.length - 5 ]+"/"; var third_part = url[ url.length - 3 ]; var fourth_part = url[ url.length - 2 ]; var fifth_part = url[ url.length - 4 ]; var sixth_part = url[ url.length - 5 ]; var seventh_part = url[ url.length - 6 ]; jQuery(".left,.right").click(function(){ jQuery(".carousel-indicators").eq(0).css("display","block"); jQuery(".carousel-indicators").eq(1).css("display","none"); }); if (jQuery('.carousel-inner').text().trim() ==""){ sessionStorage.removeItem("year") } if(seventh_part != undefined){ if(third_part.indexOf("cummins") != -1 || fifth_part.indexOf("cummins") != -1 || seventh_part.indexOf("cummins") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#cummins').css("display","block"); jQuery('#cummins').attr("selected","selected"); } if(third_part.indexOf("powerstroke") != -1 || fifth_part.indexOf("powerstroke") != -1 || seventh_part.indexOf("powerstroke") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#powerstroke').css("display","block"); jQuery('#powerstroke').attr("selected","selected"); } if(third_part.indexOf("duramax") != -1 || fifth_part.indexOf("duramax") != -1 || seventh_part.indexOf("duramax") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#duramax').css("display","block"); jQuery('#duramax').attr("selected","selected"); } }else{ if(third_part.indexOf("cummins") != -1 || fifth_part.indexOf("cummins") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#cummins').css("display","block"); jQuery('#cummins').attr("selected","selected"); } if(third_part.indexOf("powerstroke") != -1 || fifth_part.indexOf("powerstroke") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#powerstroke').css("display","block"); jQuery('#powerstroke').attr("selected","selected"); } if(third_part.indexOf("duramax") != -1 || fifth_part.indexOf("duramax") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#duramax').css("display","block"); jQuery('#duramax').attr("selected","selected"); } } jQuery(".model > option").each(function() { const model_url = jQuery(this).val(); if(model_url == initial_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } if(model_url == updated_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } if(model_url == paginated_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } }); console.log(third_part); console.log(fifth_part); var stored_year = sessionStorage.getItem("year"); if(initial_url !="https://www.choateperformance.com/shop-new/"){ jQuery(".year > option").each(function() { if(stored_year !=null){ if(stored_year == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); } }else{ const fourth_part_arr = fourth_part.split("-"); const third_part_arr = third_part.split("-"); if(sixth_part != undefined){ const sixth_part_arr = sixth_part.split("-"); } if(fourth_part_arr[2] !=undefined ){ if(fourth_part_arr[2] == "97"){ fourth_part_arr[2]="1997"; } if( fourth_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((fourth_part_arr[2].length != 4) && (fourth_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } if(third_part_arr[2] !=undefined ){ if(third_part_arr[2] == "97"){ third_part_arr[2]="1997"; } if( third_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((third_part_arr[2].length != 4) && (third_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } if(sixth_part != undefined){ const sixth_part_arr = sixth_part.split("-"); if(sixth_part_arr[2] !=undefined ){ if(sixth_part_arr[2] == "97"){ sixth_part_arr[2]="1997"; } if( sixth_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((sixth_part_arr[2].length != 4) && (sixth_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } } } }); }else{ sessionStorage.removeItem("year"); } jQuery(".year").on("change", function() { const duramax_arr = ["1994","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"]; const cummins_arr = ["1989","1990","1991","1992","1993","1994","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021"]; var selected_year = jQuery(this).val(); sessionStorage.setItem("year",selected_year ); jQuery(".make").removeAttr('disabled'); if(duramax_arr.includes(selected_year)){ jQuery("#duramax").css("display","block"); }else{ jQuery("#duramax").css("display","none"); } if(cummins_arr.includes(selected_year)){ jQuery("#cummins").css("display","block"); }else{ jQuery("#cummins").css("display","none"); } }) ; jQuery(".make").on("change", function() { var selected_make = jQuery(this).val(); var selected_year = jQuery(".year").val(); jQuery(".model").removeAttr('disabled'); jQuery(".model > option").each(function() { const model_arr = jQuery(this).attr('data-date'); if(model_arr !=undefined){ if(selected_make == jQuery(this).attr('data-value') ) { if(model_arr.indexOf(selected_year) != -1){ jQuery(this).css("display","block"); } // jQuery(this).css("display","block"); }else{ jQuery(this).css("display","none") } } }); }) ; jQuery(".model").on("change", function() { var url = jQuery(this).val(); var parent= jQuery(this).find('option:selected').attr("data-id"); jQuery(".search_url").attr("href",url); var data = { action: 'ajax_get_subcat', parent: parent, taxonomy: 'product_cat', dataType: 'json', }; var ajax_url = "https://www.choateperformance.com/wp-admin/admin-ajax.php"; jQuery.ajax({ type: 'post', url: ajax_url, data: data, beforeSend: function (response) { }, complete: function (response) { }, success: function (response) { jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href"); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href"); jQuery(".parts").prev().children().children().children().removeAttr("href"); jQuery(".pistons").prev().children().children().children().removeAttr("href"); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".parts").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".pistons").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".engines").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".gasket_seals").children().children().children().removeAttr("href"); jQuery(".parts").children().children().children().removeAttr("href"); jQuery(".pistons").children().children().children().removeAttr("href"); jQuery(".cylinder-heads").children().children().children().removeAttr("href"); jQuery(".engines").children().children().children().removeAttr("href"); jQuery(".gasket_seals").children().children().children().removeAttr("href").attr("href","#"); jQuery(".parts").children().children().children().removeAttr("href").attr("href","#"); jQuery(".pistons").children().children().children().removeAttr("href").attr("href","#"); jQuery(".cylinder-heads").children().children().children().removeAttr("href").attr("href","#"); for (var i = 0; i < response.length; i++) { //console.log(response[i].info.link); if(response[i].info.name.includes("Parts")){ console.log(response[i].info.link); jQuery(".parts").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".parts").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Pistons")){ console.log(response[i].info.link); jQuery(".pistons").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".pistons").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Gaskets and Seals")){ console.log(response[i].info.link); jQuery(".gasket_seals").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Cylinders Heads") || response[i].info.name.includes("Cylinder Heads")){ console.log(response[i].info.link); jQuery(".cylinder-heads").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Engines")){ jQuery(".engines").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".engines").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".carousel-inner").empty(); jQuery(".carousel-indicators").empty(); jQuery('.carousel-inner').css("display","block"); if(jQuery('.carousel-indicators').length == 2){ jQuery(".carousel-indicators").eq(0).css("display","block"); jQuery(".carousel-indicators").eq(1).css("display","none"); }else{ jQuery(".carousel-indicators").css("display","block"); } jQuery("#myCarousel").css("display","block"); var engine_product = response[i].engine_product_info; $count = 0; for (var j = 0; j < engine_product.length; j++) { if(j<5){ var active_class=(j==0)?"active":""; var product_name = engine_product[j].name; var index = product_name.indexOf(" "); var id = product_name.substr(0, index); var text = product_name.substr(index + 1); var sub_heading = engine_product[j].sub_heading; if(sub_heading == null){ sub_heading = ''; } var engine_html = '
CUSTOM '+id+'
'+sub_heading+'
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
'; var indicator_html = '
' jQuery('.carousel-inner').append(engine_html); jQuery('.carousel-indicators').append(indicator_html); //console.log(engine_product[i].name); } if (jQuery('.carousel-inner').text().trim() !=""){ jQuery(".shop-page-v9-slider").addClass("alter-slider-sec"); } if (jQuery('.carousel-inner').children().length == 0){ jQuery(".shop-page-v9-slider").addClass("alter-slider-sec"); } if(j>1){ jQuery(".left").css("display","block"); jQuery(".right").css("display","block"); }else{ jQuery(".left").css("display","none"); jQuery(".right").css("display","none"); } } if(jQuery(".shop-page-v9-slider").hasClass("alter-slider-remove")){ jQuery('.store-slider-outer').removeAttr("style"); jQuery('.store-slider-outer').css("display","none"); } } } if(window.location.href.indexOf("product-filter") > -1 || window.location.href.indexOf("post_type") > -1){ jQuery(".store-slider-outer").css("display","none"); } if(window.location.href.indexOf("product-filter") > -1 || window.location.href.indexOf("post_type") > -1 || window.location.href.indexOf("gaskets-and-seals") > -1 || window.location.href.indexOf("cylinder-heads") > -1 || window.location.href.indexOf("engines") > -1 || window.location.href.indexOf("parts") > -1 || window.location.href.indexOf("pistons") > -1 ){ jQuery(".store-slider-outer").css("display","none"); } }, }); return false; }) ; } })(jQuery);
- SELECT VEHICLE
CUSTOM 6.6L
FORD 2008-2010 6.4L ENGINES
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
CUSTOM 6.6L
FORD 2008-2010 6.4L ENGINES
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
CUSTOM 6.6L
FORD 2008-2010 6.4L ENGINES
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
CUSTOM 6.6L
FORD 2008-2010 6.4L ENGINES
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
Previous
Next
CYLINDER HEADS
PARTS
PISTONS
CYLINDER HEADS
Engines
PARTS
PISTONS
') } if (width <= 480 && jQuery('.elementor-hidden-phone').length > 1) { jQuery('.elementor-hidden-phone').eq(0).remove(); } else { //code for other devices } if (width <= 480 && jQuery('.carousel-inner').text().trim() ==""){ jQuery(".shop-page-v9-slider").addClass("alter-slider-remove"); jQuery(".store-slider-outer").addClass("alter-slider-remove"); } if (jQuery('.carousel-inner').children().length == 0){ jQuery(".shop-page-v9-slider").addClass("alter-slider-remove"); } var initial_url = window.location.href; var url = initial_url .split( '/' ); var updated_url= "https://"+document.location.hostname + '/' + url[ url.length - 5 ] + '/' + url[ url.length - 4 ]+ '/' + url[ url.length - 3 ]+"/"; var paginated_url = "https://"+document.location.hostname + '/' + url[ url.length - 7 ] + '/' + url[ url.length - 6]+ '/' + url[ url.length - 5 ]+"/"; var third_part = url[ url.length - 3 ]; var fourth_part = url[ url.length - 2 ]; var fifth_part = url[ url.length - 4 ]; var sixth_part = url[ url.length - 5 ]; var seventh_part = url[ url.length - 6 ]; jQuery(".left,.right").click(function(){ jQuery(".carousel-indicators").eq(0).css("display","block"); jQuery(".carousel-indicators").eq(1).css("display","none"); }); if (jQuery('.carousel-inner').text().trim() ==""){ sessionStorage.removeItem("year") } if(seventh_part != undefined){ if(third_part.indexOf("cummins") != -1 || fifth_part.indexOf("cummins") != -1 || seventh_part.indexOf("cummins") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#cummins').css("display","block"); jQuery('#cummins').attr("selected","selected"); } if(third_part.indexOf("powerstroke") != -1 || fifth_part.indexOf("powerstroke") != -1 || seventh_part.indexOf("powerstroke") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#powerstroke').css("display","block"); jQuery('#powerstroke').attr("selected","selected"); } if(third_part.indexOf("duramax") != -1 || fifth_part.indexOf("duramax") != -1 || seventh_part.indexOf("duramax") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#duramax').css("display","block"); jQuery('#duramax').attr("selected","selected"); } }else{ if(third_part.indexOf("cummins") != -1 || fifth_part.indexOf("cummins") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#cummins').css("display","block"); jQuery('#cummins').attr("selected","selected"); } if(third_part.indexOf("powerstroke") != -1 || fifth_part.indexOf("powerstroke") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#powerstroke').css("display","block"); jQuery('#powerstroke').attr("selected","selected"); } if(third_part.indexOf("duramax") != -1 || fifth_part.indexOf("duramax") != -1 ){ jQuery('.make').removeAttr("disabled"); jQuery('#duramax').css("display","block"); jQuery('#duramax').attr("selected","selected"); } } jQuery(".model > option").each(function() { const model_url = jQuery(this).val(); if(model_url == initial_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } if(model_url == updated_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } if(model_url == paginated_url ){ jQuery('.model').removeAttr("disabled"); jQuery(this).css("display","block"); jQuery(this).attr("selected","selected"); } }); console.log(third_part); console.log(fifth_part); var stored_year = sessionStorage.getItem("year"); if(initial_url !="https://www.choateperformance.com/shop-new/"){ jQuery(".year > option").each(function() { if(stored_year !=null){ if(stored_year == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); } }else{ const fourth_part_arr = fourth_part.split("-"); const third_part_arr = third_part.split("-"); if(sixth_part != undefined){ const sixth_part_arr = sixth_part.split("-"); } if(fourth_part_arr[2] !=undefined ){ if(fourth_part_arr[2] == "97"){ fourth_part_arr[2]="1997"; } if( fourth_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((fourth_part_arr[2].length != 4) && (fourth_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } if(third_part_arr[2] !=undefined ){ if(third_part_arr[2] == "97"){ third_part_arr[2]="1997"; } if( third_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((third_part_arr[2].length != 4) && (third_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } if(sixth_part != undefined){ const sixth_part_arr = sixth_part.split("-"); if(sixth_part_arr[2] !=undefined ){ if(sixth_part_arr[2] == "97"){ sixth_part_arr[2]="1997"; } if( sixth_part_arr[2] == jQuery(this).val() ){ jQuery(this).attr("selected","selected"); }else if((sixth_part_arr[2].length != 4) && (sixth_part_arr[3] == jQuery(this).val())){ jQuery(this).attr("selected","selected"); } } } } }); }else{ sessionStorage.removeItem("year"); } jQuery(".year").on("change", function() { const duramax_arr = ["1994","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"]; const cummins_arr = ["1989","1990","1991","1992","1993","1994","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021"]; var selected_year = jQuery(this).val(); sessionStorage.setItem("year",selected_year ); jQuery(".make").removeAttr('disabled'); if(duramax_arr.includes(selected_year)){ jQuery("#duramax").css("display","block"); }else{ jQuery("#duramax").css("display","none"); } if(cummins_arr.includes(selected_year)){ jQuery("#cummins").css("display","block"); }else{ jQuery("#cummins").css("display","none"); } }) ; jQuery(".make").on("change", function() { var selected_make = jQuery(this).val(); var selected_year = jQuery(".year").val(); jQuery(".model").removeAttr('disabled'); jQuery(".model > option").each(function() { const model_arr = jQuery(this).attr('data-date'); if(model_arr !=undefined){ if(selected_make == jQuery(this).attr('data-value') ) { if(model_arr.indexOf(selected_year) != -1){ jQuery(this).css("display","block"); } // jQuery(this).css("display","block"); }else{ jQuery(this).css("display","none") } } }); }) ; jQuery(".model").on("change", function() { var url = jQuery(this).val(); var parent= jQuery(this).find('option:selected').attr("data-id"); jQuery(".search_url").attr("href",url); var data = { action: 'ajax_get_subcat', parent: parent, taxonomy: 'product_cat', dataType: 'json', }; var ajax_url = "https://www.choateperformance.com/wp-admin/admin-ajax.php"; jQuery.ajax({ type: 'post', url: ajax_url, data: data, beforeSend: function (response) { }, complete: function (response) { }, success: function (response) { jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href"); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href"); jQuery(".parts").prev().children().children().children().removeAttr("href"); jQuery(".pistons").prev().children().children().children().removeAttr("href"); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".parts").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".pistons").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".engines").prev().children().children().children().removeAttr("href").attr("href","#"); jQuery(".gasket_seals").children().children().children().removeAttr("href"); jQuery(".parts").children().children().children().removeAttr("href"); jQuery(".pistons").children().children().children().removeAttr("href"); jQuery(".cylinder-heads").children().children().children().removeAttr("href"); jQuery(".engines").children().children().children().removeAttr("href"); jQuery(".gasket_seals").children().children().children().removeAttr("href").attr("href","#"); jQuery(".parts").children().children().children().removeAttr("href").attr("href","#"); jQuery(".pistons").children().children().children().removeAttr("href").attr("href","#"); jQuery(".cylinder-heads").children().children().children().removeAttr("href").attr("href","#"); for (var i = 0; i < response.length; i++) { //console.log(response[i].info.link); if(response[i].info.name.includes("Parts")){ console.log(response[i].info.link); jQuery(".parts").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".parts").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Pistons")){ console.log(response[i].info.link); jQuery(".pistons").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".pistons").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Gaskets and Seals")){ console.log(response[i].info.link); jQuery(".gasket_seals").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".gasket_seals").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Cylinders Heads") || response[i].info.name.includes("Cylinder Heads")){ console.log(response[i].info.link); jQuery(".cylinder-heads").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".cylinder-heads").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); } if(response[i].info.name.includes("Engines")){ jQuery(".engines").children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".engines").prev().children().children().children().removeAttr("href").attr("href",response[i].info.link); jQuery(".carousel-inner").empty(); jQuery(".carousel-indicators").empty(); jQuery('.carousel-inner').css("display","block"); if(jQuery('.carousel-indicators').length == 2){ jQuery(".carousel-indicators").eq(0).css("display","block"); jQuery(".carousel-indicators").eq(1).css("display","none"); }else{ jQuery(".carousel-indicators").css("display","block"); } jQuery("#myCarousel").css("display","block"); var engine_product = response[i].engine_product_info; $count = 0; for (var j = 0; j < engine_product.length; j++) { if(j<5){ var active_class=(j==0)?"active":""; var product_name = engine_product[j].name; var index = product_name.indexOf(" "); var id = product_name.substr(0, index); var text = product_name.substr(index + 1); var sub_heading = engine_product[j].sub_heading; if(sub_heading == null){ sub_heading = ''; } var engine_html = '
CUSTOM '+id+'
'+sub_heading+'
Shipping Lead Times May Vary
ORDER CUSTOM ENGINE
'; var indicator_html = '
' jQuery('.carousel-inner').append(engine_html); jQuery('.carousel-indicators').append(indicator_html); //console.log(engine_product[i].name); } if (jQuery('.carousel-inner').text().trim() !=""){ jQuery(".shop-page-v9-slider").addClass("alter-slider-sec"); } if (jQuery('.carousel-inner').children().length == 0){ jQuery(".shop-page-v9-slider").addClass("alter-slider-sec"); } if(j>1){ jQuery(".left").css("display","block"); jQuery(".right").css("display","block"); }else{ jQuery(".left").css("display","none"); jQuery(".right").css("display","none"); } } if(jQuery(".shop-page-v9-slider").hasClass("alter-slider-remove")){ jQuery('.store-slider-outer').removeAttr("style"); jQuery('.store-slider-outer').css("display","none"); } } } if(window.location.href.indexOf("product-filter") > -1 || window.location.href.indexOf("post_type") > -1){ jQuery(".store-slider-outer").css("display","none"); } if(window.location.href.indexOf("product-filter") > -1 || window.location.href.indexOf("post_type") > -1 || window.location.href.indexOf("gaskets-and-seals") > -1 || window.location.href.indexOf("cylinder-heads") > -1 || window.location.href.indexOf("engines") > -1 || window.location.href.indexOf("parts") > -1 || window.location.href.indexOf("pistons") > -1 ){ jQuery(".store-slider-outer").css("display","none"); } }, }); return false; }) ; } })(jQuery);