downah Posted May 8, 2012 Share Posted May 8, 2012 Hi guys, I have a few little problems with the tipTip jquery tooltip, it seems to work pretty well and I am using it on my website, but I can't find a way to insert an image in there, or to style it (neither with the included style from the tooltip itself) This is what I am using <script language="javascript"> $(function(){ $(".someClass").tipTip(); }); </script> and this is how I implement it into the html echo '<a href="profile.php?username='; echo $row['username']; echo '" class="someClass" title="'; echo $row['username']; echo ' '; echo $row['gender']; echo ' '; print yearsSince($dob); echo '">'; echo ucfirst($row['username']); echo "</a></td>"; I tried styling the class someClass but that styles the whole url, as I only want the title basically. any suggestions? Sorry in advance if this might be very basic, but I have not used javascript and or jqeury a lot at all. Link to comment https://forums.phpfreaks.com/topic/262253-couple-of-questions-on-tiptip-jquery-tooltip/ Share on other sites More sharing options...
Adam Posted May 10, 2012 Share Posted May 10, 2012 Did you check the documentation? You can pass a "content" option to provide the content when you bind. The tool tip text is taken from the title, otherwise. You don't want to be putting HTML within a HTML attribute. Link to comment https://forums.phpfreaks.com/topic/262253-couple-of-questions-on-tiptip-jquery-tooltip/#findComment-1344440 Share on other sites More sharing options...
downah Posted May 11, 2012 Author Share Posted May 11, 2012 I have done indeed, I have looked at the content option but I couldnt get it to work..I tried it like this: <script language="javascript"> $(function(){ $(".someClass").tipTip({content: "testcontent";}); }); </script> any suggestions on the styling maybe? Link to comment https://forums.phpfreaks.com/topic/262253-couple-of-questions-on-tiptip-jquery-tooltip/#findComment-1344709 Share on other sites More sharing options...
Adam Posted May 11, 2012 Share Posted May 11, 2012 I have done indeed, I have looked at the content option but I couldnt get it to work..I tried it like this: <script language="javascript"> $(function(){ $(".someClass").tipTip({content: "testcontent";}); }); </script> any suggestions on the styling maybe? You're syntax is wrong, remove the semi-colon in the options object. Should be: {content: "testcontent"} Link to comment https://forums.phpfreaks.com/topic/262253-couple-of-questions-on-tiptip-jquery-tooltip/#findComment-1344726 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.