Check if multiple options are selected.
I have the following choice:
<select name="extra_especialidad[]" multiple="multiple">
For some reason, the name is sent using parentheses, and I cannot change anything or add anything to the element.
I'm trying to check if a selection option is selected, I tried this without success ...
$("input[name=extra_especialidad\\[\\]]").length; //Gives me 0 always
$("input[name=extra_especialidad\\[\\]]").val().length; //gives me error
Any tips?
Thanks in advance.
+4
2 answers