我想在设计之间切换
/* Heart sign */
.fav {
margin-left: 0px;
color: #0099CC;
padding-left: 20px;
padding-right: 4px;
padding-bottom: 4px;
-moz-border-radius: 5px;
border-radius: 5px;
background: url(../images/heart-icons.png) no-repeat 4px 4px;
}
fav:hover {
cursor: pointer;
margin-left: -1px;
margin-right: -1px;
background-color: #EDEDED;
border: 1px solid #999999;
background: url(../images/heart-icons.png) no-repeat 4px -13px #EDEDED;
}
jQuery:
$('.fav').live('click', function(e){
$(this).toggleClass('fav:hover');
});
但这不起作用!请有任何帮助