Aborting jQuery().load()

Posted by Daniel I-S on Stack Overflow See other posts from Stack Overflow or by Daniel I-S
Published on 2010-06-09T01:57:03Z Indexed on 2010/06/09 2:02 UTC
Read the original article Hit count: 396

The .load() function of the jQuery library allows you to selectively load elements from another page (subject to certain rules). I would like to know whether it is possible to abort the load process.

In our application, a user can browse a list of items. They may choose to click a button which loads and displays additional information about an item from another document (which can take some time). If they choose a different item in the list whilst a .load() is still happening, I would like the loading to be aborted.

Is this possible? Is it even worth it? Any ideas?

Dan

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery