hgerdin
hgerdin

Reputation: 637

jQuery-chosen library

Is there a way that I can see when a chosen script has been performed? I would like a function that works like this:

$('#events-drop-down').chosen({}, function(event){
    // Perform something when chosen has been loaded.
});

Is there anyway that I can achieve this with chosen library?

Upvotes: 0

Views: 197

Answers (1)

lonesomeday
lonesomeday

Reputation: 237845

As far as I can tell, there is nothing asynchronous about the loading of the chosen plugin. The next line of code will not be run until all the actions there are complete.

$('#events-drop-down').chosen({});
console.log('Will be run after chosen has been applied');

Upvotes: 1

Related Questions