开发者

jquery image-background chrome problem

This doesn't seem to work in chrome:

$(function(){
$('body').css('background-image','url(/static/img/b1_left.png');
}

when I apply it in css it works fine:

background-image: url('/static/img/b1_left.png');

in firefox both work fine.

I need it to work in jquery, to process hover events (when something is hovered, it and another element has to chang开发者_如何学JAVAe background)


Missing a parentheses:

$(function(){
  $('body').css('background-image','url("/static/img/b1_left.png")');
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜