You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also need this but the event name should be namespaced to avoid collisions with other libraries. Maybe the event should be named load.chained.remote.
Well, I've forked the project, made the change, created a test and... works ok with jQuery, fails miserably with Zepto.
Seems that the problem is on the event name.
If I use load.chained.remote as the event name it works only with jQuery.
If i use customloadevent as the event name it works everywhere.
I am far from being an expert, so googling about this I found a related article with helpful comments. I'm sending the PR with the event named as chaned:load but suggestions are very welcome.
I added a trigger to the getJSON so I could listen to the event.
Changes -
request = $.getJSON(settings.url, data, function(json) {
build.call(self, json);
/* Force updating the children. */
$(self).trigger("change");
$(self).trigger("dataLoaded", [self]);
});
Usage -
$("target_select").on("dataLoaded", function (e) {
//do stuff.
});
The text was updated successfully, but these errors were encountered: