Please finally a simple code to animate multiple images for a header

I know it's there in java

not jquery

but something easily modifiable

it's been a long time I want that for a website

Views: 59

Reply to This

Replies to This Discussion

Give this a try

<script type="text/javascript">
var images = ['image.jpg', 'image.jpeg', 'image.jpg'];
var i = 0;

setInterval(function(){
x$('#xg_masthead').css('background-image', function() {
if (i >= images.length) {
i=0;
}
return 'url(' + images[i++] + ')';
});
}, 5000);
</script>

RSS

Latest Activity


NC for Hire
JFarrow replied to John Bizley's discussion 'A few adjustment for your video feed player in your social channels page.'
"you too Bernard, of course."
1 hour ago

NC for Hire
JFarrow replied to John Bizley's discussion 'A few adjustment for your video feed player in your social channels page.'
"nice work and terrific share.  John you're appreciated!"
1 hour ago

NC for Hire
JFarrow replied to SM's discussion 'Just discovered Disqus commenting on Ning - how do we add more features?'
"they do.  it's call like.  i changed mine to 'promote'  which of…"
2 hours ago
soaringeagle replied to soaringeagle's discussion 'google disavow 101'
"i have for 2 days been tackling this list for many hours a day and the scrollbars barely moved from…"
2 hours ago
Jelena replied to israel's discussion 'Pantalla de Administrador o Creador (Manage'
"el 2.0 es diferente a ning 3.0  y tu sitio es un ning 3.0 por ahora nadie puede integrar…"
3 hours ago
Rosas † Negras shared a profile on Twitter
3 hours ago
Rosas † Negras replied to OneCrow's discussion 'Navigation For Our Network'
"lol"
4 hours ago
Rosas † Negras favorited caro's profile
4 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service