...

View Full Version : newsticker-jquery



madu
09-16-2010, 10:39 AM
hi,
i was looking for a effect like http://twitter.com/. finally i found it.

this is the demo which i found http://woorktuts.110mb.com/newstickerjq/index.html

but i have massive problem, that it is not smoother like twitter.
when top image disappear, other images are come-up. may this move up be smooth like twitter, it'll great. this is the javascript


<script type="text/javascript">
$(document).ready(function(){

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

function removeFirst(){
first = $('ul#listticker li:first').html();
$('ul#listticker li:first')
.animate({opacity: 0}, speed)
.fadeOut('slow', 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}, speed)
.fadeIn('slow')
}

interval = setInterval(removeFirst, pause);
});

</script>
Please can any one help me? Grateful for any help!

harbingerOTV
09-22-2010, 10:03 PM
this seems to work. not super smooth but, I think that has a lot to do with the speed settings.


<script type="text/javascript">
$(document).ready(function(){

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

function removeFirst(){
first = $('ul#listticker li:first').html();
$('ul#listticker li:first')
.animate({opacity: 0}, speed)
.fadeOut('slow', function() {
$(this).animate({'height': '0px'}, 300, 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}, speed)
.fadeIn('slow')
}

interval = setInterval(removeFirst, pause);
});
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum