> This should work:
> (...)
>
> $('#quotesContainer').load('quotes.htm',function(){
> var $quotes = $(this).find('p.text');
> var n = $quotes.length;
> var random = Math.floor( Math.random()*n );
> $quotes.hide().eq(random).fadeIn();
> });
Works like a charm! Exactly what I needed. Thanks a lot!
While we're at it... what should I change/add to make it display one
quote for, say, 30 secs then display another one, without needing to
reload a page?
--
Justine
No comments:
Post a Comment