I have PhoneGap-iOS Application for iPad where User will get Logout Popup as shown in Image below.
I want this popup to hide when User clicks on Body.
My code
which works on native browser is not working on iPad Simulator
.
$("body").ClickOrTouch(function (evt) {
if (!(evt.target.id == "launchUsername") {
$('#launchLogout').hide();
}
});
In iPhone, iPad devices click event will work in anchor tag only not for span or div tags, so try this it will work.
$("body").on('click touchend', function (evt) {
if (!(evt.target.id == "launchUsername") {
$('#launchLogout').hide();
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With