.mouseup(); takes a function as it's argument. So the user is creating a function while passing it through to .mouseup();
It could also have been done like this. $(document).mouseup(mouseUpFunction); function mouseUpFunction(e) // e is the event { if($(e.target).parent("a.signin").length==0) { $("fieldset#signin_menu").hide(); } } Another way, and I would think a better way, to do it would be $("a.signin").click(function(){ $("fieldset#signin_menu").hide(); }); Hope this helped. On Sep 29, 4:03 pm, runrunforest <craigco...@gmail.com> wrote: > Hi, > > this code is from a dropdown box, where clicking on the "a.signin" > will open or close the box. So I don't really get how the syntax below > work > > $(document).mouseup(function(e) { > if($(e.target).parent("a.signin").length==0) { > $("fieldset#signin_menu").hide(); > } > });