javascript - Any way to know when data is bound to select (dropdown) -


i'm looking eventhandler or hack can tell me when data bound select or when dropdown has been "filled" speak..

i have 3 cascading dropdowns. first 2 filters data 3rd speak

my question is; there way know when data has been bound 3rd dropdown? i'm using this cascading dropdowns (if helps)

the javascript in link provide onready method, when of dropdowns done initializing, problem here i'm looking moment when json has filled dropdown data.

thanks in advance

try triggering custom event on data response:

$.getjson('/api/storages', request, function(data) {      $(document).trigger('databound');      response($.map(data, function(item, index) {                       return {            label: item + ' gb',            value: item,            selected: index == 0 // set true mark selected item          };      })); }); 

and listen custom event:

$(document).on('databound', function() {     // stuff... }); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -