mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
clarified blurb about how events are preserved for form buttons
This commit is contained in:
parent
0b5bd9ed06
commit
e3644c8fd9
1 changed files with 2 additions and 3 deletions
|
|
@ -47,9 +47,8 @@
|
|||
<a href="index.html" data-role="button">Link button</a>
|
||||
|
||||
<h2>Form buttons</h2>
|
||||
<p>For ease of styling, the framework automatically converts any <code>button</code> element or <code>input</code> with a <code>type</code> of <code>submit</code>, <code>reset</code>, <code>button</code>, or <code>image</code> into a custom styled link-based button — there is no need to add the <code> data-role="button"</code> attribute. </p>
|
||||
<p>The original form-based button is hidden, but remains in the markup. When a click event fires on a link button, it triggers a click on the original form button.</p>
|
||||
|
||||
<p>For ease of styling, the framework automatically converts any <code>button</code> or <code>input</code> element with a <code>type</code> of <code>submit</code>, <code>reset</code>, <code>button</code>, or <code>image</code> into a custom styled button — there is no need to add the <code> data-role="button"</code> attribute. </p>
|
||||
<p>To preserve events bound to the original <code>button</code> or <code>input</code>, the framework hides the original element by making it transparent and positioning it over the new button markup. When a user clicks on the the custom-styled button, they're actually clicking on the original element.</p>
|
||||
|
||||
<p><strong>Button</strong> based button:</p>
|
||||
<button>Button element</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue