Answer the question
In order to leave comments, you need to log in
How to fix jquery in ie?
There is a site . And javascript doesn't work on it. The drop-down menu does not open when clicked and the filter on this page does not work . I put a polyfill but it did not help, I tried using the babel converter but it did not help.
Here is the code
"use strict";
var li = document.querySelectorAll('.nav-link_item');
li.forEach((li)=>{
li.addEventListener('click', ()=>{
toggleTab(li);
})
});
function toggleTab(li) {
li.closest('.nav-item').classList.toggle('active')
}
$(document).ready(function(){
$('.filter-btn').on('click', function(e) {
//--Получаем выбранный тег
$('.filter-btn').addClass('active');
e.preventDefault();
var chosen_tag = $(this).html();
//--Скрываем все изображения
$('.b1').hide();
//--Показываем только изображения с выбранным тегом
$('.b1').each(function(){
if ($(this).attr('data-tag') == chosen_tag) $(this).show();
});
});
});
$('.slider').slick({
dots: false,
infinite: true,
speed: 500,
fade: true,
autoplay: true,
cssEase: 'linear'
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question