I am trying to figured out how to make a menu disappear when the user clicks outside of it.
my approach is this :
$(*).not(menu).bind('click', function() { $(menu).hide() })
for some reason this is not working. any idea what I might be doing wrong?
thank you
this
is evil, mad and bad karma!
use instead
Try to avoid the universal selector
*at all times. Sizzle will indeed query all available elements in your markup which is terribly expensive.