Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That's because these things (I mean tooltip etc) are jQuery plug-ins. And yes, they assume some basic knowledge about jQuery. I would suggest you to look for at least a basic tutorial about jQuery.</p> <p>You'll always have to define which elements should have a tooltip. And I don't understand why Bootstrap should provide the class, you define those classes or yourself. Maybe you were hoping that bootstrap did automatically some magic? This magic however, can cause a lot of problems as well (unwanted side effects).</p> <p>This magic can be easily achieved to just write <code>$(".myclass").tooltip()</code>, this line of code does exact what you want. The only thing you have to do is attach the myclass class to those elements that need to apply the tooltip thingy. (Just make sure you run that line of code after your DOM has been loaded. See below.)</p> <pre><code>$(document).ready(function() { $(".myclass").tooltip(); }); </code></pre> <p>EDIT: apparently you can't use the class <em>tooltip</em> (probably because it is somewhere internally used!).</p> <blockquote> <p>I'm just wondering why bootstrap doesn't run the code you specified with some class I can include.</p> </blockquote> <p>The thing you want produces almost the same code as you have to do now. The biggest reason however they did not do that, is because it causes a lot of trouble. One person wants to assign it to an element with an ID; others want to assign it to elements with a specified classname; and again others want to assign it to one specified element achieved through some selection process. Those 3 options cause extra complexity, while it is already provided by jQuery. I haven't seen many plugins do what you want (just because it is needless; it really doesn't save you code).</p>
 

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