0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Document that tooltip+popover show+hide methods are async; fixes #15500

[skip sauce]
This commit is contained in:
Chris Rebert 2015-01-15 17:15:41 -08:00
parent dbffb0b47f
commit 63f3136450
2 changed files with 7 additions and 6 deletions

View File

@ -252,20 +252,21 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
<p>Initializes popovers for an element collection.</p> <p>Initializes popovers for an element collection.</p>
<h4>.popover('show')</h4> <h4>.popover('show')</h4>
<p>Reveals an element's popover. This is considered a "manual" triggering of the popover. Popovers whose both title and content are zero-length are never displayed.</p> <p>Reveals an element's popover. <strong>Returns to the caller before the popover has actually been shown</strong> (i.e. before the <code>shown.bs.popover</code> event occurs). This is considered a "manual" triggering of the popover. Popovers whose both title and content are zero-length are never displayed.</p>
{% highlight js %}$('#element').popover('show'){% endhighlight %} {% highlight js %}$('#element').popover('show'){% endhighlight %}
<h4>.popover('hide')</h4> <h4>.popover('hide')</h4>
<p>Hides an element's popover. This is considered a "manual" triggering of the popover.</p> <p>Hides an element's popover. <strong>Returns to the caller before the popover has actually been hidden</strong> (i.e. before the <code>hidden.bs.popover</code> event occurs). This is considered a "manual" triggering of the popover.</p>
{% highlight js %}$('#element').popover('hide'){% endhighlight %} {% highlight js %}$('#element').popover('hide'){% endhighlight %}
<h4>.popover('toggle')</h4> <h4>.popover('toggle')</h4>
<p>Toggles an element's popover. This is considered a "manual" triggering of the popover.</p> <p>Toggles an element's popover. <strong>Returns to the caller before the popover has actually been shown or hidden</strong> (i.e. before the <code>shown.bs.popover</code> or <code>hidden.bs.popover</code> event occurs). This is considered a "manual" triggering of the popover.</p>
{% highlight js %}$('#element').popover('toggle'){% endhighlight %} {% highlight js %}$('#element').popover('toggle'){% endhighlight %}
<h4>.popover('destroy')</h4> <h4>.popover('destroy')</h4>
<p>Hides and destroys an element's popover.</p> <p>Hides and destroys an element's popover.</p>
{% highlight js %}$('#element').popover('destroy'){% endhighlight %} {% highlight js %}$('#element').popover('destroy'){% endhighlight %}
<h3 id="popovers-events">Events</h3> <h3 id="popovers-events">Events</h3>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-striped bs-events-table"> <table class="table table-bordered table-striped bs-events-table">

View File

@ -213,15 +213,15 @@ $('#example').tooltip(options)
<p>Attaches a tooltip handler to an element collection.</p> <p>Attaches a tooltip handler to an element collection.</p>
<h4>.tooltip('show')</h4> <h4>.tooltip('show')</h4>
<p>Reveals an element's tooltip. This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed.</p> <p>Reveals an element's tooltip. <strong>Returns to the caller before the tooltip has actually been shown</strong> (i.e. before the <code>shown.bs.tooltip</code> event occurs). This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed.</p>
{% highlight js %}$('#element').tooltip('show'){% endhighlight %} {% highlight js %}$('#element').tooltip('show'){% endhighlight %}
<h4>.tooltip('hide')</h4> <h4>.tooltip('hide')</h4>
<p>Hides an element's tooltip. This is considered a "manual" triggering of the tooltip.</p> <p>Hides an element's tooltip. <strong>Returns to the caller before the tooltip has actually been hidden</strong> (i.e. before the <code>hidden.bs.tooltip</code> event occurs). This is considered a "manual" triggering of the tooltip.</p>
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %} {% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
<h4>.tooltip('toggle')</h4> <h4>.tooltip('toggle')</h4>
<p>Toggles an element's tooltip. This is considered a "manual" triggering of the tooltip.</p> <p>Toggles an element's tooltip. <strong>Returns to the caller before the tooltip has actually been shown or hidden</strong> (i.e. before the <code>shown.bs.tooltip</code> or <code>hidden.bs.tooltip</code> event occurs). This is considered a "manual" triggering of the tooltip.</p>
{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %} {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
<h4>.tooltip('destroy')</h4> <h4>.tooltip('destroy')</h4>