Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I'm designing a website,in the first page I want to rotate a div when $(document).ready.
when it rotates, scrolls become visible.maybe it's a simple question, but answers are appreciated.tnx


JavaScript
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>jQuery Rotate</title>
    <script type="text/javascript" src="jquery-1.9.1.min.js"></script>
    <script src="Jquery.rotate.js"></script>

</head>
<body>
    <div id="Div1" class="rotation" style="width: 100%; height: 100%; margin-removed auto; margin-removed auto;">
        <img src="Back.jpg" />
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            document.body.style.backgroundColor = "Black";
            $('#Div1').delay(1000).animate({ rotate: '-20deg'}, 2000);
        });

    </script>
</body>
</html>
Posted
Comments
vaibhav10Dec1987 23-Apr-13 3:44am    
If you want to completly remove scroll bar from Div1 then try Css property
overflow:hidden;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900