Generate simple Facebook-style tooltips using jQuery Tipsy plugin.
I am not the developer for this jQuery plugin.
I only enhanced so that it can be use as a Yii extension.
Yii 1.1.7 or above, should work with other releases too
Example of Usage (with global settings):
$this->widget('application.extensions.tipsy.Tipsy', array( 'fade' => false, 'gravity' => 'n', 'items' => array( array('id' => '.element_class'), array('id' => '#element_id'), array('id' => array('model' => $model, 'attribute' => 'model_attribute_name') ,'fallback' => 'Put custom tooltip here.' ), ), ));
Example of Usage (with item specific settings):
$this->widget('application.extensions.tipsy.Tipsy', array( 'trigger' => 'hover', 'items' => array( array('id' => '.element_class', 'fade' => false, 'gravity' => 'n',), array('id' => '#element_id', 'gravity' => 'sw'), array('id' => array('model' => $model, 'attribute' => 'model_attribute_name') ,'fallback' => 'Put custom tooltip here.' ,'trigger' => 'manual' ), ), ));
When used with CGridView, add the following code:
$this->widget('zii.widgets.grid.CGridView', array( ... 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', ... ?>
Total 13 comments
I suggested to you or update download link in here, or basically remove from it and refer user to github for download.
@onkar,
get latest version of js and css file from forum page.
hopefully it will solve your problem
I am using this extension. All the things working fine but the arrow does not show for me. How to solve this issue.
i was having an issue with IE9, tooltip was appearing in top-left of screen when rendering the page in modal window.
nothing mentioned on this forum helped, so i just checked the github of the author and found there are updated on file https://github.com/jaz303/tipsy/tree/master/src
i replaced my files with updated files and issue is solved now.
Thanks for the extension.
The attached files in this page are not working correctly. just download the latest versions from github.
Trigger Focus don't work. The arrows don't show up.
why the 'focus' trigger and title didn't work?
i just put this code on my view:
thanks anyway
i see the tooltip, only i cannot offset it.
Also the arrow.gif doesn't show up.
Had posted on the forum here the latest JS + CSS from the original author. Just dump it in the appropriate and overwrite the old stuff.
The code would allow for the behavior as advertised by the author.
Thanks Kamal for the original port. :)
thanks kamarulismail .. I will download the last version and let you know ...
I already upgrade Tipsy to version 1.1. Thanks for all the comments and feedback. Especially to Raoul & thyseus. ^_^
Once the bug found by thyseus is fixed, this extension works fine. However, it would have been nice to wrap the latest version of the tipsy plugin (1.0.0a) instead of version 0.1.7. I copy&paste your code sample and found that the 'sw' gravity is not working. It seems that only the latest version support composite gravity values like 'nw' for 'north-west' ... version 0.1.7 does not.
That's no big deal :
..and 'sw' works !!
One other little thing is default values set by the extension for 'delayIn' and 'delayOut'. IMHO 2.5 seconds is really too much ... why not set it to 0 instead ?
Maybe for the next version ? ;)
Works well, but you have to mind one cornerstone:
1.) 'htmlOptions' MUST be set, otherweise you get a CException.
Here is a (for me) working example:
Thank you for this extension !
p.s. the Exception could be easily fixed by appending a @ at line 58 in Tipsy.php
Leave a comment
Please login to leave your comment.