klaus, hmmm.... well, basically I want to ultimately be able to do
this:

   $('.trackerdiv').trackit();

right now, my trackmouse function looks at the srcEvent and figures
out which div the mouse was clicked on. that works fine.

    if(srcEvent.className== ' trackerdiv')

i want to pass 'trackerdiv' as variable to the extension.


make sense?

On Feb 25, 3:33 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On Feb 25, 7:33 pm, jquertil <[EMAIL PROTECTED]> wrote:
>
> > this is interesting:
>
> > I have a standard function in JS, and call it like so:
>
> > document.onmousedown=trackmouse
>
> > function trackmouse(){...}
> > works very nicely.
>
> > I tired to make it happen jQuery-style, but no dice.
>
> > $(document).mousedown(function(){})
>
> Is this the code you're using? You're attaching an empty function to
> the mousedown event. Shouldn't that be:
>
> $(document).mousedown(trackmouse);
>
> I don't see why you need to extend the jQuery object prototype (== fn)
> here. You do this if you want to create chainable methods, which
> doesn't seem to be the case.
>
> --Klaus

Reply via email to