Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery get context?

Having this code :

 $(".toggle", '.Div1').on('click',function () 
  {
   alert("I was clicked becuase im .toggle is under the context of _________");
  });

I need to get the context which the $(this) value is under.

How can I get the value of _______ ?

like image 552
Royi Namir Avatar asked Mar 22 '26 12:03

Royi Namir


1 Answers

It's not possible. The Event object does not contain any reference to the jQuery object used to bind it.

like image 196
ThiefMaster Avatar answered Mar 24 '26 02:03

ThiefMaster