jQuery获取上下文

jQuery get context?

本文关键字:上下文 获取 jQuery      更新时间:2023-09-26

使用以下代码:

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

我需要得到$(this)值所在的上下文。

如何得到_______的值?

不可能。Event对象不包含任何用于绑定它的jQuery对象的引用