Your problem is that you're using the DOM "this" instead of the jQuery
$(this).

Read more about that here:
http://remysharp.com/2007/04/12/jquerys-this-demystified/


Andy matthews
 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of revivedk
Sent: Wednesday, December 03, 2008 5:12 AM
To: jQuery (English)
Cc: [EMAIL PROTECTED]
Subject: [jQuery] getting clicked element


Hi.
how would I register what element is clicked on the site?

I need to be able to register what element is clicked, on the entire DOM.

                           $(document).click(function () {
                                        var oBj = this;
                                  //alert($(oBj).text());
                                });

this doesn't work, as it returns the entire DOM. and I only need the element
that is being clicked on.

how would I do this?


Reply via email to