jquery dynamic select append options expecting alert("text") -



jquery dynamic select append options expecting alert("text") -

i have pulled info backend using ajax/json, , trying append info select box using jquery. info appended select box properly, showing on page when set alert("some text").

here code:

jquery.ajax({ url: "the_url.php" success: function(data) { var comp_select = jquery("select[class='xf-depselect-selector depselect-fragment']").get(3); alert("ready now"); (var = 0; < data.length; i++) { jquery(comp_select).append(jquery('<option>', { value: data[i]["component_name"] }).text(data[i]["component_name"])); } }, complete: function() {}, async: false, datatype: 'json' });

jquery select dynamic append xataface

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -