Bootstrap 3 Essential Training, Creating a tooltip

Tooltips are a really nice way to enhance some inline content and they’re super simple to do. So, all you have to do is just grab a sentence like this, and then I’m going to delete this right here, and then pick a word. So, I’m going to put this on reptiles and it’s going to go inside an anchor tag. And this anchor tag is going to get a few parameters here. So, you can give it a data-toggle of tooltip and then you add data-placement and that can be top, bottom, right, or left.

I’m going to put this at the bottom. And then you do a title and then you paste that popover text as the title and I’m going to grab reptiles and paste that anchor closing tag right after the word. And when I save this, you’ll see the link. Now, this is not going to work. The tooltips have to be activated separately in JavaScript.

So, this is all you need. However, you’re going to have to do one more thing. We’re going to need to open up our JavaScript and in our script.js file, we’re going to have to target that tooltip and tell it to activate.

Leave a Reply

avatar
1000
  Subscribe  
Notify of