Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Missing success callback call #2

Closed
LoneCoder opened this Issue · 4 comments

2 participants

@LoneCoder

Hi,
I think success callback is not saved in the object

$this.append(markup);
if (typeof success == 'function') {
setTimeout(success, 0);
}

when the method looks for the function, it's is out of scope,
so success cannot be called

@kolyuchiy
Owner

Hi,
Thanks for the bug report. Please try the updated version.

@LoneCoder

Hi,
thanks for the quick fix, it works well now.
May i suggest to replace

setTimeout(success, 0);

with

setTimeout(function (){success.call($this);}, 0);

so we are able to pass the affected element to callback via this ?

bye

@kolyuchiy
Owner

Yes, of course. It's a good suggestion.
I've updated the code.

@LoneCoder

thank you

@LoneCoder LoneCoder closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.