I'm using this:
$vehicleTypeDropdown = element.find(".vehicleTypeDropdown");
Then at later point of time I want to locate the #pselect
ID element.
My $vehicleTypeDropdown
looks like this which is the jqLite object:-
<select class="vehicleTypeDropdown" id="vehicleType">
<option id="#pselect" value="">Please Select</option>
<option ng-repeat="types in selectedType" value="Vt3" class="ng-scope ng-binding">vt3</option>
<option ng-repeat="types in selectedType" value="Vt4" class="ng-scope ng-binding">vt4</option>
</select>
There are two questions -
It's written in the jqLite documentation that
.find()
method only looks for the tags, not for classes or ids. So how do I get$vehicleTypeDropdown = element.find(".vehicleTypeDropdown");
as an
jqLite
object with the content?And how can I find the option with
#pselect
? I want to remove that manually, keeping in mind that it can be in any order in the options.