JQuery bind on Ajax success
You need to call bind()
in order to force your callbacks context (this
) to be the right thing. Otherwise, it is called in the global context by default (apparently, jQuery calls it with a context of the jqXHR object). bind()
sets the context of your function to whatever this
is supposed to be.