我有一个对象文字,如下所示。在Init方法中,我为单击事件设置了一个处理程序。稍后,当调用处理程序时,我希望使用this关键字访问this属性。在这一点上,this具有jQuery的含义。$("#postId").click(this.Foo); // here **this** is jQuery}如何在Foo中访问此对
我正在尝试将对象文字传递给jQuery中的.attr()方法,以自动创建一个DOM元素。问题是当有多个属性要设置时,它会失败。// this works when there is only one attribute to set, but fails when there is more than 1
jQuery