Hello all,
I'm trying to get a calculation to appear in a DIV, in HTML. The calculation shows fine with the HTML, but my problem is that the result is showing straight away. I want it to display 5 seconds after the calculation is done (it's done in jquery).

What do I need to change to get this working? I looked on google and it said to use delay but it isn't working.

$("#result").show().delay(5000).html("<p>Your BMI result is:"+ ++bmi + "</p>");

By the way, if your wondering why I use show, it's because the div is hidden using jquery using hide().

I would appreciate it if someone tells me how to make the 5 second delay.


You have the right idea, but your sequence is off:

$("#result").html("<p>Your BMI result is:</p>").delay(5000).fadeIn();‚Äč

You can see it in action here: http://jsfiddle.net/kc5T9/8/

Also if you want it to fade in a little slower you can use


Hope this helps.

Hi Dschuett,
I managed to get the problem solved using a slightly different approach

$("#result").html("<p>Your BMI result is:"+ ++bmi + "</p>");

Thanks for your help :)