I'm using codes below to auto click an id on page load. It works on desktop but not on mobile. How to auto "tap" the id on mobile?
<div id="media"></div>
$(document).ready(function(){
$('#media').click(function() {
alert('tap!');
});
$('#media').trigger('click');
});