Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I would like to confirm something just to make sure that I am not doing something wrong here....

 

When using/adding a tooltip to a text like this for example

 

<p>Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them.</p>

 

Do I need to place this code on the same page or template_bottom.php to be able to trigger the tooltip or is that script already included somewhere inside the bootstrap.js / bootstrap.min.js?

 

<script>
    $(function () {
        $('[data-toggle=tooltip]').tooltip()
    })
</script>

Posted

You would need to add that code (or better, target the actual links) to initialise the tooltips.

 

I would add the code into the "template" file of the module (eg, /includes/modules/content/navigation/templates/navbar.php

 

 

<a href="#" class="xyz123" data-toggle="tooltip" title="Default tooltip">

 

<script>$(function () { $('.xyz123').tooltip() })</script>
Posted

Thanks for the explanation.

 

I was was working on some tooltips and I was not sure if adding the javascript code is necessary or not since Bootstrap normally don't need additional code.

Like carousel or tabs they just work if you add the right id or class.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...