Click here to Skip to main content
14,392,270 members
Rate this:
Please Sign up or sign in to vote.
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.
<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

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

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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

Hope this helps.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100