I have a demo link that I want to add click
event for window. It works fine for desktop but not for mobile.
Basically I run tests on lastest Chrome and Safari,
$('#button1').click(function(){
$('#text').append('<div> jquery click</div>')
// this would get executed on both desktop and mobile
})
window.addEventListener('click', function() {
$('#text').append('<div> native click on window</div>')
// this only gets executed on desktop
})
So my question is, why the click
event doesn't fire when on mobile?