lundi 2 février 2015

Touch not working on iPad with collapse tabs

I have a collapsable tab bar, I wanted it so when I click anywhere on the page it collapses the tabs, I used the code below which works perfect. But, I cant get it to work on touch (iPads, iPhones, etc.)



$(document).click(function(e) {
// make sure the click is outside the tabs
if($(e.target).parents('#tabs').length == 0) {
$('#tabs ul li.ui-state-active a').trigger('click');
}
});


Any help will be great if someone could tell me exactly how to code it to work with tough also. Thanks


Here is the link of how I got the code to the click and the click on a computer works fine: Collapse jquery tab when click outside of the div




Aucun commentaire:

Enregistrer un commentaire