I need to select the element by custom attribute value where the element type should be image. I know the following selectors to get the element
By element type
var imgElms = $("input[type=image]");
By custom attribute
var cusElms = $("input[myAttr='org']");
I need mix of both selector to get all image element that has custom attribute myAttr='org'.
You'd mix them by simply using both, like this
$("input[type=image][myAttr='org']")
but note that myAttr is not a valid attribute, and you should be using data-attributes instead
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