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

attributeMultiple ( attributeFilter1, attributeFilter2, attributeFilterN ) version added: 1.0

  • attributeFilter1
    Type: Selector
    An attribute filter.
  • attributeFilter2
    Type: Selector
    Another attribute filter, reducing the selection even more
  • attributeFilterN
    Type: Selector
    As many more attribute filters as necessary

Description: Matches elements that match all of the specified attribute filters.

Examples:

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

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>css demo</title>

  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
  

<input id="man-news" name="man-news">
<input name="milkman">
<input id="letterman" name="new-letterman">
<input name="newmilk">

<script>

$( "input[id][name$='man']" ).val( "only this one" );

</script>

  
</body>
</html>

Demo: