成功切换背景图像()jQuery



此问题现已解决

请参阅下面更新的css。

我目前有:

$("form#FanDetail").serialize(),
function(){
$('form#FanDetail').hide(function(){
$('div.success').fadeIn();
// setup for next tab: [about]
$('li#about').removeClass('selected').addClass('Unselected'); // remove about bg, replace with gray bgColor
$('li#contact').removeClass('Unselected').addClass('selected'); // add bg, replace with red bg
});
.selected.Unselected的Css如下:
#editProfileNav ul li.selected{         /* here */
width:86px;
height:40px;
padding:0px;
margin:0 1px 0 0;
background-image:url('../img/SeleBox.png');
float:left;
list-style-type:none;
list-style:none;
}
#editProfileNav ul li.Unselected{
width:86px;
height:40px;
padding:0px;
margin:0 1px 0 0;
background-image:url('../img/unSeleBox.png');
float:left;
list-style-type:none;
list-style:none;
}
/*       was originally  using this and it was overwritting above css for `.unselected`                     
#editProfileNav ul li a{
width:86px;
height:40px;
padding:0;
margin:0 1px 0 0;
background-image:url('../img/SeleBox.png');
float:left;
list-style-type:none;
list-style:none;
}
*/

#editProfileNav ul li a{}正在覆盖#editProfileNav ul li.selected{}CSS,因为它是CSS文档中调用的最后一个CSS。

最新更新