我很努力地獲取圖像的圖像src時,它的點擊。我只需要jQuery(this).attr("src")
但在原型中,this.readAttribute
不起作用。我得到:「this.readAttribute是不是一個函數」如何用原型獲得點擊圖像的src
$$('.more-views > ul > li > img').invoke('observe', 'click', this.updateImage.bind(this));
updateImage: function(){
//var src = jQuery(this).attr("src").replace("thumbnail/66x66", "image");//changes src from thumbnail to large image
Needs the above but in prototype.
//jQuery('#image').attr("src", src);//updates large image
this.imageEl.writeAttribute("src","http://www.timelapseme.com/images/logonew.png");
val_scale = !this.showFull ? this.slider.value : 1;
this.scale(val_scale);
},