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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -