tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

[attributeFilter1][attributeFilterN]

Multiple Attribute Selector [attribute=value][attribute2=value]

Arguments

jQuery('[attributeFilter1][attributeFilter2][attributeFilterN]')

version added: 1.0
attributeFilter1
An attribute filter.
attributeFilter2
Another attribute filter, reducing the selection even more
attributeFilterN (Optional)
As many more attribute filters as necessary

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

Examples

Example 1

Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.
$("input[id][name$='man']").val("only this one");
The output of the code above will be:

Full source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>

<script type="text/javascript" language="javascript">

  $(document).ready(function(){
$("input[id][name$='man']").val("only this one");
  });
  </script>
  
</head>
<body>
  <input id="man-news" name="man-news" />
  <input name="milkman" />

  <input id="letterman" name="new-letterman" />
  <input name="newmilk" />

</body>
</html>
Was this information helpful?
   

Comments