brand new at jquery: How to register document level mouse events
I've spent the last few hours trying to make the jump from prototype to jquery. I'm trying to use jQuery's crossbrowser event handling but I can't seem to register the event. I've tried lots of combinations and permutations that I've seen on the web but nothing seems to be working so I must be missing something.
$(document).ready(function() {
$(document).mousedown(makeDomPath);
});
function makeDomPath(e)
{
alert("foo");
}
is the one I've been trying mostly. I've also tried.
$("body").mousedown(makeDomPath);
$(document).bind("mousedown", makeDomPath);
$(document).click(makeDomPath);
$("body").click(makeDomPath);
and none of them fired. The goal here is to have a single event handler that catches all the mousedown events in the page. I'm brand new at jquery so any help would be more thank appreciated. Can anyone tell me waht I'm doing wrong?
Thanks.