<!doctype html>
<html>
<head>
<style>
body {font-family:arial;font-size:12px;}
#news-feed {background:#E9F7D4;border:1px solid #77A134;width:300px;list-style-type:none;padding:0;margin:0;height:235px;overflow:hidden;}
ul#news-feed li {padding:10px 5px;border-bottom:1px solid #77A134;margin-bottom:5px;}
</style>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>
<script type=”text/javascript”>

$(document).ready(function(){

var newsArray = [“Delhomme, Wallace sharp early for Browns”,”Bucs expect to have injured QB Freeman for opener”,”Report: Haynesworth likely has rhabdomyolysis”,”QB Orton effectively leading Broncos in preseason”,”Vernon Gholston not offended by set-up fight”,”Cubs’ Piniella to retire after Sunday”,”Bradley interested in Aston Villa job”,”Federer beats Fish for Cincinnati title”,”Garcia 3-hits Giants, Cardinals roll 9-0″, “Cano, CC power Yankees over M’s 10-0″];

// set variables here
var newsLength = newsArray.length;
var newsInterval = 3000;

$(‘h1’).after(‘<ul id=”news-feed”></ul>’);

// add the items in the array to a list
for(i=0; i < newsLength; i++){
$(‘#news-feed’).append(‘<li>’+newsArray[i]+'</li>’);
}

function slideArticle() {
$(‘#news-feed li:last’).clone().prependTo(‘#news-feed’).css(‘display’,’none’);
$(‘#news-feed li:first’).fadeIn(1000, function(){
$(this).css(‘background’,’#dedede’).delay(1000).slideDown(‘fast’, function(){
$(this).css(‘background’,’#E9F7D4′);
});
});
$(‘#news-feed li:last’).fadeOut().remove();

//$(‘#news-feed li:first’).fadeIn(100, function({
//$(this).css(‘background’,’#dedede’);
//});
}

setInterval(slideArticle, newsInterval);
});

</script>
<body>
<h1>jQuery Latest News</h1>
</body>
</html>

 

 

Este artigo foi útil ?
SimNão

9 Replies to “fadeOut() fadeIn”

  1. phdream16 disse:

    Feeling lucky? PHdream16 is giving out good vibes. Not the biggest, but seems legit and I hit a small jackpot first time around. Get your dreams started with phdream16!

  2. winzosuppo disse:

    Having issues with Winzo? Looking to find some support! Hope they’re responsive. Need to get these bugs sorted so I can get back to gaming! winzosuppo

  3. gold99casino disse:

    If you ask me, Gold99Casino has a solid reputation. Been hearing good things and decided to try it myself. Not disappointed! gold99casino

  4. sx777 disse:

    SX777, huh? Took a gamble on this one based on a friend’s recommendation, and gotta say, I’m not totally disappointed. The selection’s decent, and things run relatively smoothly. If you’re curious, take a peek at sx777 and see if it’s your thing.

  5. Trying to find the main Bong88 site? Trangchubong88 might be the place. Gimme the real deal, baby! trangchubong88

  6. Bet169 bóng đá! I’m all about that football action. Time to place my bets and root for my team. Hope I win some serious cash! Get your game on at bet169 bóng đá!

  7. betap disse:

    Anyone tried betap yet? I’m always hunting for new betting platforms. Let me know if it’s worth my time and money, fam!

  8. betipix365 disse:

    betipix365, eh? Name’s a mouthful! Is it actually a good platform or just trying too hard? Need some insider tips!

  9. sssgames disse:

    Hey, checked out sssgames and they had a fairly wide selection of games. I found games I enjoyed. It’s a good place to chill and spend some time. Games for days!

Deixe um comentário para betap Cancelar resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Close Search Window