As a followup to this answered question: Automatic scroll from mysql data in infinate loop
I'm looking for a way to vary the display time based on the length of the comment someone leaves. The longer the comment, the more time I want to give visitors to read it.
Using the code Ray supplied in his answer, we are starting with comments embeded in source
file called RAY_EE_fading_quotes_sourc
e.php and code that looks like this:
<p class="quotes"> "Comment #2 Fantastic!" <span> - Author #2 </span></p>
The [modified] script that calls that source
file and parses it looks like this:
qlist = $("p.quotes");
var qr = Math.floor( Math.random() * qlist.length );
var delay_time = 2000;
If I could figure out how to parse out just the comment from the source file and then measure the number of characters in that comment, it would be easy to assign an appropriate value to delay_time.