calebjacob / tooltipster

A jQuery tooltip plugin
MIT License
2.76k stars 480 forks source link

There is a problem to add a Tooltipster in a FancyBox #246

Closed Dimaredmi closed 10 years ago

Dimaredmi commented 10 years ago

There is a problem to add a Tooltipster in a FancyBox, nothing happens, see screenshot:

http://i1362.photobucket.com/albums/r689/Dimar2008/img1_zpsa90c6cdc.jpg

Here in a normal page if see:

http://i1362.photobucket.com/albums/r689/Dimar2008/img2_zpsf1ee62c6.jpg

Any solution??

louisameline commented 10 years ago

Hello. Try to set a higher z-index value to Tooltipster than to the Fancybox.

Dimaredmi commented 10 years ago

Thank you louisameline

Could please tell me where I should add?? In the tooltipster-shadow.css not working.

louisameline commented 10 years ago

It's the .tooltipster-base class that sets the z-index value. Edit the tooltipster.css file if you don't know how to do otherwise.

Dimaredmi commented 10 years ago

Nothing, use: position, z-index, z-index Important, float, and does not work.

Is there anything else I can do to make it work?

I am implementing in a prestashop 1.6.

louisameline commented 10 years ago

If it's not a z-index problem, it's probably that you're doing something wrong. Have you initialized the tooltip after the opening of the fancybox ?

Dimaredmi commented 10 years ago

Excuse me. A What do you mean with "description initialized"?

It works well in normal page, but within the fancybox not.

You allow me to send you the web address where I have the problem? Preferably in private.

louisameline commented 10 years ago

I don't have time for this unfortunately. Please ask implementation questions on Stackoverflow, thank you.

Dimaredmi commented 10 years ago

Ok, I understand. Thanks for your help and for sharing.

Dimaredmi commented 10 years ago

I am happy :)

Achieve it work. For reference of others. I had to paste the string of script within the page that would open the Fancybox. What happened is that I was not calling the script function. By adding the chain, the effect appeared:

< script > $(document).ready(function() { $('#paso2y3').tooltipster({ animation: 'swing', delay: 200, theme: 'tooltipster-shadow', touchDevices: false, trigger: 'hover', arrow: 'false', position: 'right', offsetY: '-15px', maxWidth: '230', content: $('Paso 2 y 3: Ingrese la cantidad que desea en los campos, según los atributos como: color, diámetro, modelo, tamaño etc.. luego haga clic en el botón Añadir al Carrito') }); }); < /script >

If used before prestashop, modules know there where you can paste HTML javascrit, images, text, etc. That's what I was using to call tooltipster, but that does not work as vera Fancybox opening.

I hope my explanation is understood. Thank you very much. Greetings !!

louisameline commented 10 years ago

Glad you found it :)