Answer the question
In order to leave comments, you need to log in
Why doesn't dblclick work in jquery on iphone?
I use jquery 3.3.1 and I want to open the menu with a single click and follow the link with a double click, it works on android but not on iphone. I can't understand what is the problem, please help
javascript code like this
$(document).on('dblclick', '.DoubleClick', function() {"use strict";
window.location.assign($(this).attr('href'))
});
$(document).on('click', '.DoubleClick', function(event) {"use strict";
event.preventDefault()
$(this).siblings('ul').slideToggle();
});
<li class="two_item main-inner-menu__item item-parent">
<a href="" class="main-inner-menu__link DoubleClick">Текст ссылки</a> <span class="expandables menu-icon-close"></span>
<ul class="main-inner-menu main-inner-menu_sub main-inner-menu_2">
<li class="main-inner-menu__item"> <a href="" class="main-inner-menu__link closed-2 ">Текст ссылки</a> </li>
<li class="main-inner-menu__item"> <a href="" class="main-inner-menu__link closed-2 ">Текст ссылки</a> </li>
<li class="main-inner-menu__item"> <a href="" class="main-inner-menu__link closed-2 ">Текст ссылки</a> </li>
<li class="main-inner-menu__item"> <a href="" class="main-inner-menu__link closed-2 ">Текст ссылки</a> </li>
<li class="main-inner-menu__item"> <a href="" class="main-inner-menu__link closed-2 ">Текст ссылки</a> </li>
</ul>
</li>
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