// Mob-menu slide // $(document).ready(function(){ $('.mob-menu').on('click',function(){ $(this).toggleClass('active-menu'); $('.nav-wrap').toggleClass("open-menu"); $( '.close-menu' ).show() }); $( '.close-menu' ).on("click", function(){ $('.nav-wrap').removeClass("open-menu"); $('.mob-menu').removeClass("active-menu"); $( '.close-menu' ).hide() }); $(".car-tab li").on('click',function() { var srcPath = $(this).children('img').attr('coleour-sprite'); $("#your-image").attr("src",srcPath); $(".car-tab li").removeClass('active'); $(this).addClass('active'); }); // vertical tabs $('.v-tabs .tabs-links .item').on('click', function() { var item_id = $(this).attr('data-index'); var contents_holder = $('.v-tabs .tabs-contents'); contents_holder.find('div[id^=content_]').hide(); contents_holder.find('div#content_' + item_id).show(); $('.v-tabs .tabs-links .item').removeClass('active'); $(this).addClass('active'); }); jQuery(".scroll-x").mCustomScrollbar({ axis:"x", theme:"light-3", advanced:{ updateOnBrowserResize:true, updateOnContentResize:true } // removed extra commas }); jQuery(function(){ jQuery(".carrosserie_selection").on('click',function () { var attr_id = jQuery(this).attr('data-id'); if(attr_id == 'all'){ jQuery(".carrosseries").show("slow"); }else{ jQuery(".carrosseries").hide(); jQuery("#carrosserie_"+attr_id).toggle("slow"); } }); jQuery(".brand_selection").on('click',function () { var attr_id = jQuery(this).attr('data-brand'); if(attr_id == 'all'){ jQuery(".brand_listing").show("slow"); jQuery(".car-model.carrosseries").show(); }else{ jQuery(".brand_listing").hide(); jQuery(".car-model.carrosseries").hide(); jQuery("."+attr_id+"-brand").toggle("slow"); jQuery("."+attr_id+"-brand").parent().parent().show(); } }); }); if($('input[name="brand_referral"]').val()){ jQuery(".brand_listing").hide(); jQuery(".car-model.carrosseries").hide(); jQuery("."+$('input[name="brand_referral"]').val()+"-brand").toggle("slow"); jQuery("."+$('input[name="brand_referral"]').val()+"-brand").parent().parent().show(); } }); $(function () { let slider = $('.img-slider'); slider.slick({ infinite: true, speed: 600, slidesToShow: 1, autoplay: true, autoplaySpeed:5000, fade: false, arrows: true, appendArrows: $('.slide__arrows'), prevArrow: '
', nextArrow: '', dots: true, appendDots: $('.slide__dots'), }); }); function slideGo(dir) { let slider = $('.img-slider'); if(dir === "+") { slider.slick('slickNext'); } else if ( dir === "-" ) { slider.slick('slickPrev'); } }