V
V
v7resspect2017-04-12 16:46:28
JavaScript
v7resspect, 2017-04-12 16:46:28

Why doesn't jQuery's document.on('click') fire on iOS?

Hello guys. Tell me, who knows the reason, or who has come across why the on event does not fire in this example:

$(document).on('click', '.poster', function(e) {
  e=e||window.event;
  var target=e.target||e.srcElement;
  if( $(e).parents('.opened').length ) return;
  $(this).parents('.item').addClass('opened');
});

Everywhere works, in iOS for some reason refuses.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2017-04-12
@bootd

What is e ??

e=e||window.event;
  var target=e.target||e.srcElement;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question