Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Change the text by altering the text in the element directly. (does not update the tooltip position).</p> <pre><code>$('.tooltip-inner', $element.next()).html(newHtml); $('.tooltip-inner', $element.next()).text(newText); </code></pre> <p>Change the text by destroying the old tooltip, then creating and showing a new one. (Causes the old one to fade out and the new one to fade in)</p> <pre><code>$element .tooltip('destroy') .tooltip({ // Repeat previous options. title: newText, }) .tooltip('show'); </code></pre> <p>I'm using the top method to both animate the "Saving." message (using <code>&amp;nbsp</code> so the tooltip does not change in size) and to change the text to "Done." (plus padding) when the request completes.</p> <pre><code>$element.tooltip({ placement: 'left', title: 'Saving...', trigger: 'manual', }).tooltip('show'); var parent = $element.parent(); var interval_id = setInterval(function(){ var text = $('.tooltip-inner', parent).html(); switch(text) { case 'Saving.&amp;nbsp;&amp;nbsp;': text = 'Saving..&amp;nbsp;'; break; case 'Saving..&amp;nbsp;': text = 'Saving...'; break; case 'Saving...': text = 'Saving.&amp;nbsp;&amp;nbsp;'; break; } $('.tooltip-inner', parent).html(text); }, 250); send_request( function(){ // When the request is complete clearInterval(interval_id); $('.tooltip-inner', parent).html('Done.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'); setTimeout(function() { $element.tooltip('hide'); }, 1500 /* Show "Done." for a bit */); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload