How to add a background image in css when it already has a background image
Hello Friends,
This is my
HTML
<li id="myemail" class="myemail"> <a href="a.php">TEXT</a></li>
CSS
.myemail{ background-image:url(/hcj/images/email1.png); background-repeat:no-repeat; }
.myemail:hover{ background-image:url(/hcj/images/email2.png); background-repeat:no-repeat; }
.myemail3{ background-image:url(/hcj/images/email3.png); background-repeat:no-repeat; }
Jquery Code
$('#myemail').removeClass('myemail').addClass('myemail3');
$('.myemail').css('background-image','url('+ /image/email3.png +')' );.
I am trying two jquery way of changing the background image when a certain condition is met in php i.e.
I am trying to remove a class and add another class
OR
I change the css background image
but neither of them are working for me, please help me as to where am I going wrong.
Thanks in advance.....