How can I get all the options of a select through jQuery by passing on its ID?
I am only looking to get their values, not the text.
How can I get all the options of a select through jQuery by passing on its ID?
I am only looking to get their values, not the text.
Use:
$("#id option").each(function()
{
// Add $(this).val() to your list
});
.each() | jQuery API Documentation