For ex.:
$("#"+$(this).attr("id")+" option[value='0']")
Can we reduce the code to something like
$(this+" option[value='0']")
These will do the same as your first statement: find the option
elements having 0
as their value
and being the (not restrictively direct) child of this
.
$(this).find('option[value="0"]')
or
$('option[value="0"]', this)
Resources:
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