Heres the situation i am able to show on hover the src as being chenged but the image on the screen itself doesnt actualy change. any help would be a great help.
$('.hoverImgs').hover(
function(){mouseOn = 1; formSelector('hover');},
function(){mouseOn = 0; formSelector('out');
});
function formSelector(method){
if(mouseOn === 1 && method === 'hover'){
$(this).attr("src", "images/radio_hover.png");
alert($(this).attr("src"));
}
else {}
}
});
The context is lost when you call the function
formSelectorandthiswould window object inside the function. You should either passthisobject as an argument or invoke the function using.call/.apply.Try like below,