Community Central
Community Central
Forums: Index Support Requests Any way to make link caption invisible?
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 4798 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.

I found an interesting topic about CSS tooltip here, and installed the codes by Sovq on my wiki. It's perfectly working as I wished, but when I wrap an internal link:

<span class="tooltip">[[Forum:Support Requests]]<span class="classic">Tooltip text</span></span>

it displays an another tooltip(link caption) beside the CSS one. (here's a Screenshot.) So this time, I tried ajax tooltip code but it didn't even work.

For now, I'm using a simple trick to not have this doubled caption:

<span class="tooltip plainlink">[http://community.wikia.com/wiki/Forum:Support_Requests Forum:Support Request]<span class="classic">Tooltip text</span></span>

But this seems not to be the proper way to solve the problem and I wouldn't like to make templates out of this. Please point me the right way.  Cafeinlove msg 2012-05-03, 12:40 pm(UTC+9)

I'm not really sure about this, but to shorten the code, you could replace it with:
<span class="tooltip plainlink">
[/wiki/Forum:Support_Requests Forum:Support Request]<span class="classic">Tooltip text</span></span>
Sam Wang (talk) 04:57, May 3, 2012 (UTC)
Post a link to a page of where the tooltip works as intended, please! Maybe we can take it from there... --  pecoes  05:48, May 03, 2012 (UTC) 
Hmm.. good question. I'm not sure you can remove the link title (that is what I understand the issue is) from internal links. You could remove the "plainlink" class though - formatting the links as external ones should remove the alt text, but since they're still links to internal content, the won't have the little arrow icon. Also, I think it was "plainlinks", not "plainlink". I'm curious if anyone can come up with a proper solution for removing the alt text though. Sovq 07:52, May 3, 2012 (UTC)
The only way to prevent the title tooltip would be to remove or empty the title attribute. I very much doubt that can be done with CSS. With JavaScript it's trivial though:
$(function () {
    $('.tooltip').children('a').attr('title','');
});


 pecoes  08:24, May 03, 2012 (UTC) 
I'll try this solution rather than my code. I think that is what I was looking for.  Cafeinlove msg 2012-05-03, 17:46 pm(UTC+9)
Marvellous, when mouseovered no more link title appears. Thank you Pecoes and everyone, for the solution, and for being interested in the topic.  Cafeinlove msg 2012-05-03, 17:55 pm(UTC+9)
My template, I wanted it to create tooltips according to their pagename: {{Template|Article Name|Tooltip Text}} giving an internal link to the Article Name, and when hovered over, to have a pop-up'd text. But if I use this trick, I will have to enter the article name twice when there's a space within it: {{Template|Article Name|Article_Name|Tooltip Text}} I want to reduce this waste.  Cafeinlove msg 2012-05-03, 17:46 pm(UTC+9)
No, actually that idea - the one I just deleted calling it dumb - is probably quite good after all. With the fullurl parser function you can convert "Article Name" to https://community.fandom.com/wiki/Article_Name which solves both problems:
  1. It properly wiki-escapes and url-encodes the article name - making your second parameter superfluous and
  2. it converts the local name into a full URL that can be used with single brackets and won't get a title attribute
<span class="tooltip">[{{fullurl:Article Name}} Article Name]</span>
Sorry about the back and forth. I just experienced a sharp drop of my caffeine level :( --  pecoes  10:08, May 03, 2012 (UTC) 
I did well to come back, you got an even better way. I think I already experienced this format but my brain wasn't working well enough, arr. Thank you after all.  Cafeinlove msg 2012-05-03, 19:36 pm(UTC+9)
Well, I discored something using this.. This doesn't make distiction between an existing article and an not existing one: both is displayed in blue color. Should be an issue though.  Cafeinlove msg 2012-05-03, 19:55 pm(UTC+9)