Question

I have an html snippet like this :

<div>
<div>&nbsp;</div>
<div class="news">
<ul id="listticker">
 <li><b>"Lorem Ipsum is a dummy text used by designers from all over the world. While writing Lorem ipsum you dont need worry grammar about and splleing mistkae. You get complete freedome of writing anything you want. I love Lorem Ipsum so much. .</li>
 <li><b>"Lorem Ipsum is a dummy text used by designers from all over the world. While writing Lorem ipsum you dont need worry grammar about and splleing mistkae. You get complete freedome of writing anything you want. I love Lorem Ipsum so much. </li>
 <li><b>"Lorem Ipsum is a dummy text used by designers from all over the world. While writing Lorem ipsum you dont need worry grammar about and splleing mistkae. You get complete freedome of writing anything you want. I love Lorem Ipsum so much. . </li>
</ul>
</div>
</div>

where in i have called the news_ticker script like this

<script src="js/news_ticker.js" type="text/javascript"></script>

And the code for the ticker is following

$(document).ready(function () {

    var first = 0;
    var speed = 800;
    var pause = 3500;

    function removeFirst() {
        first = $('ul#listticker li:first').html();
        $('ul#listticker li:first')
.animate({ opacity: 0, height: "0px" }, speed, 'linear', function () { $(this).remove(); });
        addLast(first);
    }

    function addLast(first) {
        last = '<li style="display:none">' + first + '</li>';
        $('ul#listticker').append(last)
        $('ul#listticker li:last')
.animate({ opacity: 1, height: "auto" }, speed)
.fadeIn('slow')
    }
        interval = setInterval(removeFirst, pause);
});

Why doesn't my ticker scroll at all?

Was it helpful?

Solution

Your ticker works fine, maybe your version of jQuery library is old. I test it with jQuery v2.0.3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top