javascript - How to make all my onclick event clickable in ios browser? -


i using html5/jquerymobile create web page.and know onclick function in not work on ios device browser.how can change onclick event accessible tap?so can tap on ios device browser.

this work on uniqueid create.

  $("#button").tap(function(e) {     e.preventdefault();     alert("test"); }); 

i want onclick event tap.any idea?

the below code catch tap events on document.

$(document).on('tap', function () {  $('<p>tap</p>').appendto('#content'); // example }); 

this works on ios browsers desktop browsers (tested).

<div data-role="page" id="page">  <div data-role="header">   <h1>header</h1>  </div>  <div data-role="content" id="content">tap events</div>   <div data-role="footer">   <h4>footer</h4>  </div> </div> 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -