.each() -> mouseover on Elements
Hi everybody,
I have 4 Images, which schould change their "src" by mouseover()/mouseout()
- jQuery( "#selecter img" ).each(function(){
alert ( this.id+jQuery(this).attr('id') ) ;
jQuery( jQuery(this).attr('id') ).mouseover(function(){
alert ( jQuery(this).attr('id') ) ;
jQuery( jQuery(this).attr('id') ).attr("src","dk_images/"+jQuery(this).attr('id')+"_1.jpg") ;
});
});
- <span id="selecter">
<img id="select_one" src="dk_images/select_one_0.jpg" />
<img id="select_two" src="dk_images/select_two_0.jpg" />
</span>
The first alert is working, but the mouseover() won't do anything.
Does anybody have an idea, what I am doing wrong ?