G
G
GIRU2020-02-03 19:06:02
JavaScript
GIRU, 2020-02-03 19:06:02

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'
});


How to fix jquery, js in ie?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-02-03
@vadik007

First: arrow function.
Secondly: where is the babel code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question