Javascript close pop up div -
i have div hide/show onclick adds or removes css class. want able close/hide div when user clicks outside div area.
how do this? thanks!
i think you're looking can done javascript. event called 'onblur' triggers event handler when loses focus (e.g. div).
you can read more here: http://www.w3schools.com/jsref/event_onblur.asp
basically call javascript function when object loses focus:
onblur="myfunction();" ...and 'myfunction()' have javascript change css.
Comments
Post a Comment