一直在它几个小时请帮助
$("#NewsReel").click(function(){
if( $(".block_news").css("background","url('/new_skool/images/news_1.jpg')no-repeat"))
{
$(".block_news").css("background","url('/new_skool/images/news(2).jpg')no-repeat");
}
else
{
if( $(".block_news").css("background","url('/new_skool/images/news(2).jpg')no-repeat"))
{
$(".block_news").css("background","url('/new_skool/images/news_1.jpg')no-repeat");
}
}
});
谢谢你
它会更改图像一次,但不会触发第二个 if 语句。