We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Hover text over images?
Topic Started: Jul 15 2013, 03:50 PM (734 Views)
Stryde
Member Avatar
Member
[ *  * ]
Hey! I'd like to have a BBcode to put in hover text when you mouse over the contained element. Can anyone do this for me? It's for an event I'm running. :>

Thanks Zeta community!
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

will this tool-tip code work for what you need?

http://if.invisionfree.com/topic/5153440/
Offline Profile Goto Top
 
Stryde
Member Avatar
Member
[ *  * ]
Nope, it doesn't work with images.
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

Did you see the variation for images posted near the end of the topic?

post #39

http://if.invisionfree.com/topic/5153440
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Helena
Jul 15 2013, 06:15 PM
Did you see the variation for images posted near the end of the topic?

post #31
I do not have permission to acces this topic :cry:

Oh is that the post I made? Cory hasnt updated his RegExp so it will only work on text/html contained within a single line.
Edited by Quozzo, Jul 16 2013, 02:49 AM.
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

sorry, miscopied the link. (fixed now) It is in the tool tip topic starting at post #39.

The RegExp issue had to do with a code confliction, I think? The codes posted at the end were reported to work for images.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Quozzo
Jul 16 2013, 02:41 AM
Cory hasnt updated his RegExp so it will only work on text/html contained within a single line.
It's fine for me: http://i.imgur.com/MixuQAv.png
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Cory
Jul 16 2013, 08:37 PM
Quozzo
Jul 16 2013, 02:41 AM
Cory hasnt updated his RegExp so it will only work on text/html contained within a single line.
It's fine for me: http://i.imgur.com/MixuQAv.png
So it does, my mistake.
Offline Profile Goto Top
 
Stryde
Member Avatar
Member
[ *  * ]
Ooh, lemme give that a shot, thanks!

Edit: nope, does that same thing. Just replaces the image with the tooltip text.
Edited by Stryde, Jul 19 2013, 08:26 AM.
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Stryde
Jul 19 2013, 08:24 AM
Ooh, lemme give that a shot, thanks!

Edit: nope, does that same thing. Just replaces the image with the tooltip text.
Have you tried it the other way around?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'm really confused as to what you're requesting, do you have an example?
Offline Profile Goto Top
 
Stryde
Member Avatar
Member
[ *  * ]
It's something you can normally do in HTML. <img src="url" title="This text pops up." /> So go here: http://dreyrull.com and hover over that creature at the top of the page. You'll see "Welcome, puny humans." pop up when you mouse over it in a little white box. That's what I want to be able to program with bbcode, but I'm not sure how that'd be possible.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('button[onclick="ZetaImage()"]').after(' <button type="button" id="tooltip">Image Tooltip</button>');

$('#tooltip').click(function () {
var iURL = window.prompt('Enter the complete URL for the image', 'http://');
var tooltip = window.prompt('Enter a title for the image', '');
ZetaInsert('[img]' + iURL + '[/img][tooltip]' + tooltip + '[/tooltip]');
});

$('td:contains([tooltip]):not(:has(textarea)), div.search_results:contains([tooltip])').each(function () {
$(this).html($(this).html().replace(/\[tooltip\](.+?)\[\/tooltip\]/gi, '<span class="tooltip" style="display: none">$1</span>'));
});

$('span.tooltip').each(function () {
$(this).prev('img').attr('title', $(this).text());
});
//]]>
</script>
Offline Profile Goto Top
 
Stryde
Member Avatar
Member
[ *  * ]
It works! Wooo! Thank you! :D
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic