Skip to content

Commit 9c2c2ff

Browse files
committed
Correct the equivalent :submit selector, close jquerygh-292.
Technically the equivalent CSS-standard selector for :submit is more complex if you want to handle the case of buttons with no type attribute, but the text makes it clear this is a bad idea. You could always use a .filter() instead.
1 parent 0fbabfe commit 9c2c2ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

entries/submit-selector.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
</signature>
88
<desc>Selects all elements of type submit.</desc>
99
<longdesc>
10-
<p>The <code>:submit</code> selector typically applies to button or input elements. Note that some browsers treat <code>&lt;button&gt;</code> element as <code>type="default"</code> implicitly while others (such as Internet Explorer) do not. </p>
10+
<p>The <code>:submit</code> selector typically applies to button or input elements. Note that some browsers treat <code>&lt;button&gt;</code> element as <code>type="submit"</code> implicitly while others (such as Internet Explorer) do not. To ensure that markup works consistently across all browsers and guarantee that it is possible to consistently select buttons that will submit a form, always specify a <code>type</code> property.</p>
1111
</longdesc>
12-
<note id="jquery-selector-extension-alt" type="additional" data-selector=":submit" data-alt="[type=&quot;submit&quot;]"/>
12+
<note id="jquery-selector-extension-alt" type="additional" data-selector=":submit" data-alt="input[type=&quot;submit&quot;], button[type=&quot;submit&quot;]"/>
1313
<example>
1414
<desc>Finds all submit elements that are descendants of a td element.</desc>
1515
<code><![CDATA[

0 commit comments

Comments
 (0)