Changing backgroundImage on hover?
Hi there,
I just started using jQuery and I wanted to know how I can change the background-image when I hover my cursor of a li.
I have this code:
$(document).ready(function(){
$("#button_news").hover(function () {
$(this).css({cursor : 'pointer', backgroundColor : '#1C1C1C', color : '#CFCFCF', backgroundImage : 'url(../images/bullet_pink.png'});
}, function () {
$(this).css({backgroundColor : '#1E1E1E', color : '#444', backgroundImage : 'url(../images/bullet_black.png'});
});
$("#button_news").click(function () {
window.location = "news";
});
})
But this only works in Firefox... How can I make it work in Opera/Chrome/Safari and IE>6??
Thanks in advance,
Cas Cornelissen