Howdy_McGee Howdy_McGee - 4 months ago 6
jQuery Question

Blink Text for so many seconds - then disappear

I'm trying to fade in / out text and then after so long stop the function. For the most part when a user comes online it should say that user is online, then disapear after awhile. Right now it just keeps going - no stopping point. How do I add a point to make the fadein/out function stop?

function newUser(){
$('#new').fadeIn('slow', function() {
setTimeout("$('#new').fadeOut('slow');", 2000);

This function when called will fade in and out the content of
but it doesn't have a stopping point. How can I add a stopping time for this function?

I've tried this to see if it would work - but it only runs once? I have
initiated in beginning of my script as 0.

while(x < 4){
$j('#new').fadeIn("slow", function() {


How about something like this?

function do_blink(elm, i){
  elm.fadeIn("slow", function(){
    do_blink(elm, --i);

where you call it like this