Android : Jquery .focusout not working on mobile(slicknav)

on Wednesday, March 25, 2015


Slicknav only closes if you click the menu button again.


so I did this bit of code to make it close when you click anywhere



$(document).ready(function() {
//close menu on lost focus
$('.slicknav_menu').focusout(function(event){
$('.menu').slicknav('close');
});
});


This works on desktop when I make my window small to test, but on phone i have to touch an image for it to close, not if i just click anywhere, its like it only registers a click if you touch an element.


Can i use somethign else instead of focusout?


0 comments:

Post a Comment