有这段代码:
$(".toggle", '.Div1').on('click',function ()
{
alert("I was clicked becuase im .toggle is under the context of _________");
});
我需要获取 $(this)
值所在的上下文。
如何获取 _______
的值?
最佳答案
这是不可能的。 Event 对象不包含对用于绑定(bind)它的 jQuery 对象的任何引用。
关于javascript - jQuery 获取上下文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14257720/