Monday, 15 July 2013

jquery - How to skip inside div on document click? -



jquery - How to skip inside div on document click? -

i want close popup outside click of popup , want maintain popup after click on popup.

i using below function, whenever click closes popup. how can skip popup div below function.?

$(document).on('click', function(e){ $('#accountdetail').fadeout(300); });

try check e.target using .is() whether popping element or not,

$(document).on('click', function(e){ if(!$(e.target).is('#accountdetail')){ $('#accountdetail').fadeout(300); } });

jquery

No comments:

Post a Comment