A
A
Antonio092020-04-29 19:34:42
JavaScript
Antonio09, 2020-04-29 19:34:42

How to make links work?

but the menu submenu opened
as it is now

https://jsfiddle.net/L8pwrs6m/2/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twobomb, 2020-04-29
@Antonio09

$('.main-header__list').on('click', 'a', function(e) {
  if($(this).attr("href") == "")
  	e.preventDefault();
  $(this).next('.submenu').slideToggle();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question