-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathbutton-selector.xml
More file actions
55 lines (47 loc) · 1.6 KB
/
button-selector.xml
File metadata and controls
55 lines (47 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<entry type='selector' name="button" return="">
<sample>:button</sample>
<signature><added>1.0</added> </signature>
<desc>Selects all button elements and elements of type button.</desc>
<longdesc>
<p>An equivalent selector to <code>$(":button")</code> using valid CSS is <code>$("button, input[type='button']")</code>.</p>
</longdesc>
<note id="jquery-selector-extension" type="additional">
<placeholder name="selector">:button</placeholder>
</note>
<example>
<desc>Find all button inputs and mark them.</desc>
<code><![CDATA[
var input = $(":button").addClass("marked");
$("div").text( "For this type jQuery found " + input.length + "." );
$("form").submit(function () { return false; }); // so it won't submit
]]></code>
<css><![CDATA[
textarea { height:35px; }
div { color: red; }
fieldset { margin: 0; padding: 0; border-width: 0; }
.marked { background-color: yellow; border: 3px red solid; }
]]></css>
<html><![CDATA[<form>
<fieldset>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</fieldset>
</form>
<div>
</div>]]></html>
</example>
<category name="Form" slug="form-selectors"/>
<category name="jQuery Extensions" slug="jquery-selector-extensions"/>
<category name="Version 1.0" slug="1.0"/>
</entry>