Tuesday 6 August 2013

onclick hide div when click on anywhere in page

If you would like to open slide down panel etc. when click on panel , icon , link. Then If you would like to close it by clicking anywhere on the page except for the box itself.


Try below script:-

$(document).click(function(){  
 $('#panel').hide();  //pass your div id class which you want to hide
     });

enjoy jquery :)

No comments:

Post a Comment