we have a web application which is using Jquery blockUI to open a pop up and do some action. All of this works fine on Safari, and IE 8. problem is with Ipad. none of the ac
UPDATE: I switched .bind
to .on
because it's now the preferred way says jQuery.
As of jQuery 1.7, the
.on()
method is the preferred method for attaching event handlers to a document. jquery.com
EXAMPLE:
$('.button').on("click touchstart", function() {
});
Below is the ultimate version of the click
and touchstart
event because it still fires even with new DOM objects that are added after the DOM has been loaded. Incorporating this ultimate click event solution for any scenario.
$(document).on("click touchstart", ".button", function () {
});