javascript - Jquery Load Function with Error Message if taking too much time -


Is there any way to handle loading time, I mean when the jquery load function takes too long, Show the message. The following code is working perfectly.

  var href = $ (this) .attr ('href'); . $ ('# Load') load (href);  

Please help me! Thank you.

please try it, read more


  var href = $ (This) .attr ('href'); $ Ajax ({url: href, error: function () {// will fire on timing}, success: function () {// do something}, timeout: 3000 / set timeout to 3 seconds});  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -