diff options
| author | Adrien Siami <[email protected]> | 2015-03-25 14:46:21 +0100 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-04-21 22:20:15 -0700 |
| commit | e949505b89ca146e3af0cf735e100c82703f1cda (patch) | |
| tree | edc2027677d0377a98d3fa0a3f2a263b93491815 /docs/_includes/js | |
| parent | 48232aad6cdb5280e55e0aa0c42a4bb0d06ac03b (diff) | |
| download | bootstrap-e949505b89ca146e3af0cf735e100c82703f1cda.tar.xz bootstrap-e949505b89ca146e3af0cf735e100c82703f1cda.zip | |
Allow viewport option to be a function
Closes #16151 by merging a rebased version of it that adds docs and 1 more assertion.
Diffstat (limited to 'docs/_includes/js')
| -rw-r--r-- | docs/_includes/js/popovers.html | 3 | ||||
| -rw-r--r-- | docs/_includes/js/tooltips.html | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index dadddafc3..a782a1204 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -233,10 +233,11 @@ sagittis lacus vel augue laoreet rutrum faucibus."> </tr> <tr> <td>viewport</td> - <td>string | object</td> + <td>string | object | function</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> + <p>If a function is given, it is called with the triggering element DOM node as its only argument. The <code>this</code> context is set to the popover instance.</p> </td> </tr> </tbody> diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index a8914b180..5b399a5f3 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -199,10 +199,11 @@ $('#example').tooltip(options) </tr> <tr> <td>viewport</td> - <td>string | object</td> + <td>string | object | function</td> <td>{ selector: 'body', padding: 0 }</td> <td> <p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p> + <p>If a function is given, it is called with the triggering element DOM node as its only argument. The <code>this</code> context is set to the tooltip instance.</p> </td> </tr> </tbody> |
