So how to do it? Well the trick is simple. Simply use the .html at the beginning of the function when the .click function is triggered. Look at the following code for an idea:
$(‘#click’).click(function(){
$( “#messagediv” ).html( ‘<div id=”message” style=”padding-left:100px;font-weight:bold;”>Please Wait . . .</div>’ );
This will replace the old content from the div or will show any message you want to be shown in the div and then once it is complete you can simply use the function like this in the end to show the content on completion:
function() {
$(‘#messagediv’).html(“<div id=’message’ style=’padding-left:100px’></div>”);
$(‘#message’).html(“<h2>Database has been Updated</h2>”)
.hide()
.fadeIn(1500, function() {
});
Hope it helps.