$('#selectID').append($('<option></option>').val(val).html(text));
$('#selectID').append('<option value="'+val+'">'+text+'</option>');
Where val = value during loop and text = data.
Which is the better way to append?
What is the difference in performance between two if there is lot of data?
In my view the
later oneis better and alos you dont need to use\char if you are using combintaion of'and". you can directly so it as