Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
clarified blurb about how events are preserved for form buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
maggiewachs committed Sep 29, 2011
1 parent 0b5bd9e commit e3644c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/buttons/buttons-types.html
Expand Up @@ -47,9 +47,8 @@ <h2>Styling links as buttons</h2>
<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 &mdash; 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 &mdash; 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>
Expand Down

0 comments on commit e3644c8

Please sign in to comment.