-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathattribute-ends-with-selector.xml
More file actions
20 lines (19 loc) · 1.12 KB
/
attribute-ends-with-selector.xml
File metadata and controls
20 lines (19 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<entry type='selector' name="attributeEndsWith" return="" >
<sample>[attribute$="value"]</sample>
<signature><added>1.0</added>
<argument name="attribute" type="String">
<desc>An attribute name.</desc>
</argument>
<argument name="value" type="String">
<desc>An attribute value. Can be either an unquoted single word or a quoted string.</desc>
</argument></signature>
<desc>Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.</desc>
<longdesc></longdesc>
<example>
<desc>Finds all inputs with an attribute name that ends with 'letter' and puts text in them.</desc>
<code><![CDATA[$('input[name$="letter"]').val('a letter');]]></code>
<html><![CDATA[<input name="newsletter" />
<input name="milkman" />
<input name="jobletter" />]]></html>
</example>
</entry>