I don't want to use
$(this).parents()

My question is, if there is something like event.target that give me
the element, that I attach the event to? (live event)

On 2 ספטמבר, 03:42, Ami <aminad...@gmail.com> wrote:
> This is my Html:
>
> I am trying to get the element that I binded  to live(), but always i
> am getting it's children.
>
> For example, this is my code:
>
> <div id=div1 class=theClass><b>Hye</b></div>
> <div id=div2 class=theClass><p>Hello</p></div>
> <div id=div3 class=theClass><div><b>Hello World</b></div></div>
> </div>
>
> <script>
> $('.theClass').live('click', function () { alert('I am trying to get
> the parent div id' + this.id + ', but i am always get the child
> element of the div')])
> </script>

Reply via email to