data from javascript function
May 20, 2008 - 4:06am — sifuhall
| Project: | clueTip - flexible, enhanced tooltip |
| Version: | 0.9.7 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (ready to commit) |
Jump to:
Description
Hello,
I see that a previous version has a change that will allow it to display data from a javascript function but it doesn't seem the directions work with the current version.
(Here is the change: http://plugins.jquery.com/node/1570)
Would it be possible to add the ability to display data from a function as well?

Comments
#1
Unfortunately, the change that the user suggested doesn't work anymore, and isn't a very robust solution. The "local" option now allows for any selector to be used, not just an id, for loading local content. I'm considering another approach to using data from a javascript function. Hopefully I'll have some time yet tonight to put something together.
#2
this is in svn now
#3
That is incredible! I can't wait to try it.
Would that be this link?
http://jqueryjs.googlecode.com/svn/trunk/plugins/cluetip/jquery.cluetip....
#4
Yes, that's the one! :-)
#5
Hello again,
I have downloaded and tested it, but I'm unsure how to use it to display the output of a javascript function as the tip title and contents.
Could you post an example?
Thanks for all the help.
#6
Hi Chris,
The title should come from the title attribute, or whatever other attribute you designate as titleAttribute. If that's not satisfactory, let me know and I'll try to rig up something else.
#7
Also, hope you saw my post in the jQuery Google Group. If not, here is the relevant part:
So, now you can do something like this if you want:
$('a.mytooltip').cluetip('Hello. This will appear in the clueTipcontents.');
And you can still include other options. For example:
$('a.mytooltip2').cluetip('Hello. This will appear in the clueTipcontents.', {sticky: true});
And you can do something like this:
function moreStuff() {
return 'more stuff!';
}
$('a.mytooltip3').cluetip( moreStuff() );
#8
It works great!
Thank you for all the help!