I'm currently using this successfully to remove an option
$("select#select_gender option[value='initial']").remove();
Is there a way remove an option without adding to the selector - like below?
$('select#select_gender').val('initial').remove();
thx
$("select#select_gender option").filter("[value='initial']").remove();
I believe that does it.
or per your latest comment:
var sel = $("select#select_gender");
sel.find("option[value='initial']").remove();
PS sorry for so many edits :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With