I want to change background image of button on mousehover event.
I am using following code:
$("#btnCBI").hover(function () {
$(this).css({ "background-image": "/Tulips.jpg" });
});
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you need to use
url('path')with css. You need handler in and handler out to see the effect of hover()You can use mouseenter() if you do not want to change it back when mouse gets out of your button.