Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to auto rotate one div using jqery . I have one script this use to only scrolling from bottom to top .it will not agian rotate.
XML
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type = "text/javascript">
    $(function () {
        var interval = setInterval(function () {
            if ($("#div1").scrollTop() != $('#div1')[0].scrollHeight) {
                $("#div1").scrollTop($("#div1").scrollTop() + 10);
            } else {
                clearInterval(interval);
            }
        }, 1000);
    });
    </script

HTML
<div id="div1" style="height:60px;width:100%;border:1px solid #ccc;overflow:auto">>
</div>
Posted
Updated 30-Jun-15 22:26pm
v2

1 solution

Hi. Try with Jquery auto rotate contents.[^]

Hope this helps.
 
Share this answer
 

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