Hi I have a select like:
<select id="item_OfficeUserId" class="dropdownauditor" name="item.OfficeUserId" invoicelineid="33">
In jQuery I can get it by its class:
$(".dropdownauditor")
Is there a way to get it based on its class and it attribute invoicelineid="33" as well?
There will be more than one with class="dropdownauditor"
. I want to get the selected item of the particular select
. I was using:
$(".dropdownauditor").change(function () { $(".dropdownauditor option:selected").each(function () { ... } }
But this is running through the second part twice. ie. It tis then finding the selected for every select
with class="dropdownauditor"
Is is possible to only find only one with invoicelineid="33"
?
$(".dropdownauditor[invoicelineid='33']")
Using the attribute equals selector.
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