محتویات فایل custom.js رو با کد های زیر جای گزین کنید.
کد:(function($) { $( document ).ready(function() { var item = 3; if ($(window).width < 768) { item = 1 } if ($(window).width < 992) { item = 2 } if ($(window).width > 992) { item = 3 } }); $('.right .flexslider').flexslider({ animation: "slide", animationLoop: true, autoPlay:true, rtl: true, itemWidth: 210, itemMargin: 0, minItems: item, maxItems: 3, animationLoop:true, }); $('.middle .flexslider').flexslider({ animation: "slide", rtl: true, touch:true, animationLoop:true }); $('.best-slider .flexslider').flexslider({ animation: "slide", rtl: true, pauseText: " ", playText: " ", animationLoop:true, autoPlay:true, pausePlay: true, prevText: " ", nextText: " " }); /*------------------------------*/ if ($(window).width() > 992){ $(window).scroll(function () { var y = $(document).scrollTop(); var t = $('header .holder').offset().top; if (y > t) { $('header .bottom').addClass('fixed'); } var ly = $(document).scrollTop(); var lt = $('header .holder').offset().top; if (ly < lt) { $('header .bottom').removeClass('fixed'); } }); } /*-------------------------------*/ $('.news .right .tabs li').click(function () { var child = $(this).attr('data-tab'); $('.news .right .content .active').fadeOut(); $('.news .right .active').removeClass('active'); $('#' + child).fadeIn(); $('#' + child).addClass('active'); $(this).addClass('active'); }); $('.news .left .tabs li').click(function () { var child = $(this).attr('data-tab2'); $('.news .left .content .active').fadeOut(); $('.news .left .active').removeClass('active'); $('#' + child).fadeIn(); $('#' + child).addClass('active'); $(this).addClass('active'); }); /*-----------------------------*/ if ($(window).width() < 992){ $('.nav-menu>ul>li').click(function () { $(this).children('.drop-menu').slideToggle(); }); } $('.fa.fa-bars').click(function () { $('.nav-menu').slideToggle(); }); /*----------------------*/ $('[data-toggle="tooltip"]').tooltip(); /*------------------------------*/ $(".showModal").click(function (event) { $(".modal").show(); var x = $(event.currentTarget).attr("src"); $("#modalImg").attr("src", x); console.log(x); }); $("#overlay").click(function () { $(".modal").hide(); }); })( jQuery );





پاسخ با نقل قول