jscroll icon indicating copy to clipboard operation
jscroll copied to clipboard

Needs a user option to handle error from .load()

Open VictorySaber opened this issue 10 years ago • 1 comments

It should have a callback for when .load() (inside _load()) returns an error. Otherwise the loading image just sits there....forever.

At the moment I'm doing this (I should probably do a pull request or something but I'm still learning my way around GitHub):

$inner.find('div.jscroll-added').last().load(data.nextHref, function(r, status, xhr) { if (status === 'error') { // Let the user know there was an error loading the next set of content. $('.jscroll-loading').empty(); $('.jscroll-loading').html("There was an error retrieving the next set of data"); // Remove the loading image. return _destroy();

VictorySaber avatar Feb 24 '14 11:02 VictorySaber

Yep, this is definitely needed. it could be a callback or an event that gets triggered on the element.

jtsternberg avatar Oct 08 '15 04:10 jtsternberg