Multiple Attribute Selector [name="value"][name2="value2"]

Matches elements that match all of the specified attribute filters.

.attributeMultiple(attributeFilter1, attributeFilter2, attributeFilterN)

attributeFilter1 SelectorAn attribute filter.
attributeFilter2 SelectorAnother attribute filter, reducing the selection even more
attributeFilterN SelectorAs many more attribute filters as necessary

Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.

JS
<input id="man-news" name="man-news" />
<input name="milkman" />
<input id="letterman" name="new-letterman" />
<input name="newmilk" />
HTML
$("input[id][name$='man']").val("only this one");
DEMO

Looking for a Web Developer?

👋

Hi! I'm Basti, author of this site. If you are looking for a web developer with 15+ years of experience, holla at me!

Be it the good 'ol jQuery, vanilla JS or modern frameworks like Vue and Svelte, front- or backend, I can help you.

Just write me at jobs@jqapi.com :)