I have this code below:
jQuery.noConflict();
var x=0;
myw=0;
oin="";
jQuery(document).ready(function () {
if(x >3){
$("img:odd").unbind("mouseenter");
return false;
}
jQuery("img:odd").mouseenter(function(e) {
// oin="";
console.log(e);
console.log(this);
console.log(this.src);
oin=this.src;
this.src="snowdrop.png";
myw=this.width;
this.width=100;
x=x+1;
console.log(x);
jQuery(this).css("opacity", 0.5);
}).mouseout(function(e) {
this.width=myw;
this.src=oin;
jQuery(this).css("opacity", 1.0);
});
});
The code runs fine but what I want to do is after 3 mouseovers(mouseenter) I want to disable the mouseenter event. I can't figure out how to unbind it?
Thanks, Jim