diff options
| author | Chris Rebert <[email protected]> | 2014-05-15 01:58:19 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-05-15 01:58:19 -0700 |
| commit | a40ff40b8fb852af8034b215e2102ca8ff1618e0 (patch) | |
| tree | b11d54724a711eb5e1cbea7156641d36eccce4c5 | |
| parent | f6bebbd83af66476da63fada2766165dac9fb0a7 (diff) | |
| parent | 00fcf072c6955b1e5ba51298db1026c91783eef6 (diff) | |
| download | bootstrap-a40ff40b8fb852af8034b215e2102ca8ff1618e0.tar.xz bootstrap-a40ff40b8fb852af8034b215e2102ca8ff1618e0.zip | |
Merge pull request #13601 from twbs/tooltip-popover-doc
Sync tooltip & popover docs
| -rw-r--r-- | docs/_includes/js/popovers.html | 74 | ||||
| -rw-r--r-- | docs/_includes/js/tooltips.html | 38 |
2 files changed, 60 insertions, 52 deletions
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index b2f58fbc4..2ee670741 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -152,6 +152,33 @@ $('.popover-dismiss').popover({ <td>Apply a CSS fade transition to the popover</td> </tr> <tr> + <td>container</td> + <td>string | false</td> + <td>false</td> + <td> + <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p> + </td> + </tr> + <tr> + <td>content</td> + <td>string | function</td> + <td>''</td> + <td> + <p>Default content value if <code>data-content</code> attribute isn't present.</p> + <p>If a function is given, it will be called with 1 argument, which is the element that the popover is attached to.</p> + </td> + </tr> + <tr> + <td>delay</td> + <td>number | object</td> + <td>0</td> + <td> + <p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p> + <p>If a number is supplied, delay is applied to both hide/show</p> + <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p> + </td> + </tr> + <tr> <td>html</td> <td>boolean</td> <td>false</td> @@ -170,21 +197,9 @@ $('.popover-dismiss').popover({ <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td> </tr> <tr> - <td>trigger</td> - <td>string</td> - <td>'click'</td> - <td>How popover is triggered - click | hover | focus | manual</td> - </tr> - <tr> - <td>title</td> - <td>string | function</td> - <td>''</td> - <td>Default title value if <code>title</code> attribute isn't present</td> - </tr> - <tr> <td>template</td> <td>string</td> - <td><code>'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'</code></td> + <td><code>'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'</code></td> <td> <p>Base HTML to use when creating the popover.</p> <p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p> @@ -194,32 +209,25 @@ $('.popover-dismiss').popover({ </td> </tr> <tr> - <td>content</td> + <td>title</td> <td>string | function</td> <td>''</td> - <td> - <p>Default content value if <code>data-content</code> attribute isn't present.</p> - <p>If a function is given, it will be called with 1 argument, which is the element that the popover is attached to.</p> - </td> + <td>Default title value if <code>title</code> attribute isn't present</td> </tr> <tr> - <td>delay</td> - <td>number | object</td> - <td>0</td> - <td> - <p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p> - <p>If a number is supplied, delay is applied to both hide/show</p> - <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p> - </td> + <td>trigger</td> + <td>string</td> + <td>'click'</td> + <td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td> </tr> <tr> - <td>container</td> - <td>string | false</td> - <td>false</td> - <td> - <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p> - </td> - </tr> + <td>viewport</td> + <td>string | object</td> + <td>{ selector: 'body', padding: 0 }</td> + <td> + <p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ selector: '#viewport', padding: 0 }</code></p> + </td> + </tr> </tbody> </table> </div><!-- /.table-responsive --> diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 64ea06e85..e967878f8 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -91,6 +91,24 @@ $('#example').tooltip(options) <td>Apply a CSS fade transition to the tooltip</td> </tr> <tr> + <td>container</td> + <td>string | false</td> + <td>false</td> + <td> + <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p> + </td> + </tr> + <tr> + <td>delay</td> + <td>number | object</td> + <td>0</td> + <td> + <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p> + <p>If a number is supplied, delay is applied to both hide/show</p> + <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p> + </td> + </tr> + <tr> <td>html</td> <td>boolean</td> <td>false</td> @@ -106,7 +124,7 @@ $('#example').tooltip(options) <td>selector</td> <td>string</td> <td>false</td> - <td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td> + <td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td> </tr> <tr> <td>template</td> @@ -132,24 +150,6 @@ $('#example').tooltip(options) <td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td> </tr> <tr> - <td>delay</td> - <td>number | object</td> - <td>0</td> - <td> - <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p> - <p>If a number is supplied, delay is applied to both hide/show</p> - <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p> - </td> - </tr> - <tr> - <td>container</td> - <td>string | false</td> - <td>false</td> - <td> - <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code></p> - </td> - </tr> - <tr> <td>viewport</td> <td>string | object</td> <td>{ selector: 'body', padding: 0 }</td> |
