我试图this指向img对象方法中的函数内部的每个,就像这样
var responsiveImageSwap = (function(){
return {
init : function(){
$.each('img', function(){
var width = $(window).width(),
_this = this,
alert(_this.attr('src'))
})
}
}
})();
responsiveImageSwap.init();
但它是引用object而不是引用img,我如何引用图像?