1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-28 07:39:57 +02:00

Add tooltip viewport option, respect bounds of the viewport

This commit is contained in:
Ben Ogle
2013-11-22 11:58:53 -08:00
parent 8fb75ee9e7
commit edb221a20c
4 changed files with 203 additions and 30 deletions

View File

@@ -1027,6 +1027,22 @@ $('#example').tooltip(options)
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code></p>
</td>
</tr>
<tr>
<td>viewport</td>
<td>string</td>
<td>'body'</td>
<td>
<p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code></p>
</td>
</tr>
<tr>
<td>viewportPadding</td>
<td>number</td>
<td>0</td>
<td>
<p>Pixel distance to keep the tooltip from the edges of the viewport element. Example: <code>viewportPadding: 10</code></p>
</td>
</tr>
</tbody>
</table>
</div><!-- /.table-responsive -->