mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
Allow viewport option to be a function
Closes #16151 by merging a rebased version of it that adds docs and 1 more assertion.
This commit is contained in:
committed by
Chris Rebert
parent
48232aad6c
commit
e949505b89
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user