How To Get The Src Of A Clicked Image With Prototype
I am struggling to get the image src of a image when its clicked. I just need the jQuery(this).attr('src') but in prototype, this.readAttribute doesn't work. I get: “this.readAtt
Solution 1:
Try this:
updateImage: function (){
var src = $(this).readAttribute('src');
...
}
Solution 2:
Thanks wajiw I fixed it by var that = this, so I could use it later and getting rid of .bind(this)
Post a Comment for "How To Get The Src Of A Clicked Image With Prototype"