开发者

a javascript string problem?

开发者 https://www.devze.com 2023-02-03 07:46 出处:网络
i have this script, but i the result.bgimage is not showing up, i think JS thinks its a string rather th开发者_JS百科an variable!!! how can i solve this problem? thanks

i have this script, but i the result.bgimage is not showing up, i think JS thinks its a string rather th开发者_JS百科an variable!!! how can i solve this problem? thanks

$('#bg')
    .animate({opacity: 0}, 'slow', function() {
        $(this)
            .css({'background-image': 'url(result.bgimage)'})
            .animate({opacity: 1});
    });


$('#bg')
    .animate({opacity: 0}, 'slow', function() {
        $(this)
            .css({'background-image': 'url(' + result.bgimage + ')'})
            .animate({opacity: 1});
    });
0

精彩评论

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