开发者

Body size depends on resolution jQuery

want to create a dynamic website using jQuery scroll to .My elements should be very spread. I want to put them into an absolute position.

So what i want to do is that jQuery gets the window.width and height of the visitors screen . and multiplie the width*5 height*4 so my elements will be, where they belong. i ca开发者_如何学Pythonn use a scroll to by anchor locallink # ..

Yet I'm not very strong in js /jQuery thats why I need ur help ;-)

<script type="text/javascript">
        $(function(){
        var body_width = $('windows.width');
        $('body').body_width*5();

    });
</script>


Try with this:

var bWidth = $('body').width();
$('body').width(bWidth * 5);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜