select - jQuery: Best practice to populate drop down? -
I see that the examples posted all the time look like sub-western, because it includes the constructing strings, which is not Looks like jQuery It usually looks like this:
$ GetJSON ("/ admin / GetFolderList /", function (result) {for (var i = 0; i & lt; result.lamp; i ++) {option + = '& lt; option value = "' + result [ I]. Imagefolder id '' "& gt; '+ results [i] .name +' gt; '}}}); Is there a better way?
Turn off Andreas Grech was pretty ... it really is this (In the context of note, in the loop in this item instead):
var option = $ ("#options"); $ .each (Results, Functions) (options.append ($ ("option />"). Val (this.ImageFolderID) .text (this.Name));});
Comments
Post a Comment