I have used a javascript to show div by onclick but when i click outside div i want to hide the div. How to do it in javascript? i\'m using javascript code..
you can use blur() function when you clicked somewhere else
$("#hidelink").click(function() { $("#divtoHide").show(); }); $("#hidelink").blur(function() { $("#divtoHide").hide(); });