Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

Second call to element while still fading


Project:jQuery fade anything plugin
Version:1.0.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If I make a second call to the element to which the vkfade() was applied, so as to change the text, while the fade is in process or has not finished, the element behaves very strangely.

This happens because I am using one element for displaying messages while processing an Ajax request, and the request finishes before the fade is completed, and I use the same element to notify the user that the request is complete.

To fix this problem I had to decrease the fade to to 2000ms, or a small amount of time that allows the fade to complete or be almost complete by the time the Ajax request finishes.

The code that causes this problem is shown below:

...
$("#errMsg").hide();
...
$("#errMsg").css("color","#666666");
$("#errMsg").text("Sending your QuickNote... Please wait...");
$("#errMsg").slideDown("slow");
$("#errMsg").vkfade();
...
$.ajax({
url: "afile.php",
data: "phpdata",
success: function(responseText) {
...
$("#errMsg").html(responseText);
},
error: function() {
...
$("#errMsg").text("Error processing your request.");
}
...