Jump to content

Using popovers on PS front office


Recommended Posts

I would like to use popovers on some front office pages to show info text on mouse hovering.
https://build.prestashop.com/prestashop-ui-kit/?path=/docs/popovers--popovers

 

I thought this was already integrated into Prestashop/Bootstrap, but using following code it doesn't works:

<button
  type="button"
  class="btn btn-primary"
  data-container="body"
  data-toggle="popover"
  data-trigger="hover"
  data-placement="left"
  title="Dismissible popover"
  data-content="Testo da mostrare"
>testo bottone</button>

Any help?

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

I know this is kinda old, but I found this page in google, which mean others might find it too, So I might as well answer it.

Simply add this either in a .js file or include it in your tpl/twig file between a <script></script> tag that you want to have popover working.

		$(function () {
			$('[data-toggle="popover"]').popover()
		});

popover in bootstrap is not active by default and need to be activated like this anytime you want to use it.

You can check other options here: https://getbootstrap.com/docs/4.0/components/popovers/

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...