The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> A different type of mouse over, image displayed on text roll over
Midnight Kat
post Mar 12 2009, 09:58 PM
Post #1





Group: Members
Posts: 4
Joined: 12-March 09
Member No.: 8,052



I am wanting do a mouse over effect such that when a link is moused over it switches the text to Japanese. Now, because most people do not have Japanese installed on their comps the text wouldn't show up and the effect is screwed. Therefore, I have opted to display an image instead. I am not sure how to do it so that an image is displayed on a text mouse over.

ninja.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 13 2009, 12:03 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE
I am wanting do a mouse over effect such that when a link is moused over it switches the text to Japanese. Now, because most people do not have Japanese installed on their comps the text wouldn't show up


Is this true? Have you tested it somehow? Last time I asked here, there did not seem to be anyone unable to view Japanese text...


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Midnight Kat
post Mar 13 2009, 07:00 PM
Post #3





Group: Members
Posts: 4
Joined: 12-March 09
Member No.: 8,052



QUOTE(Brian Chandler @ Mar 13 2009, 01:03 AM) *

Is this true? Have you tested it somehow? Last time I asked here, there did not seem to be anyone unable to view Japanese text...


Unless one has the foreign font install on their computer, it will only display the unknown square character.

Does this display on your comp: これは日本語です。
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Mar 13 2009, 07:10 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE
Does this display on your comp: これは日本語です。
It displays for me. I have no idea what it means, but it displays...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 13 2009, 07:40 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



Does not display for me on XP. I think I can read (well) Japanese on my 2K computer. AFAIK I haven't installed any extra language support on any of the computers, but I guess I might have on the 2K one.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 13 2009, 08:18 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



Also displays on Vista.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Midnight Kat
post Mar 13 2009, 10:16 PM
Post #7





Group: Members
Posts: 4
Joined: 12-March 09
Member No.: 8,052



Well, regardless. Does anyone know how to do a mouse over such that it changes to Japanese?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 14 2009, 09:46 AM
Post #8


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Midnight Kat @ Mar 14 2009, 04:16 AM) *

Well, regardless. Does anyone know how to do a mouse over such that it changes to Japanese?

Shouldn't be too hard, but how to do it well way may depend on the context. E.g., is it an occasional word in a text paragraph, or a dictionary-style list/table of English-Japanese words? Is it links to another (Japanese?) site? Is the Japanese text important enough that it must work even without javascript/CSS? More info, please! tongue.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Midnight Kat
post Mar 19 2009, 12:35 PM
Post #9





Group: Members
Posts: 4
Joined: 12-March 09
Member No.: 8,052



QUOTE(Christian J @ Mar 14 2009, 10:46 AM) *

Shouldn't be too hard, but how to do it well way may depend on the context. E.g., is it an occasional word in a text paragraph, or a dictionary-style list/table of English-Japanese words? Is it links to another (Japanese?) site? Is the Japanese text important enough that it must work even without javascript/CSS? More info, please! tongue.gif


Context: The mouse over is for the links in my site's menu. Example: when you mouse over "HOME" the text switches to "ホーム"; "LINKS" becomes "リンクス"; etc. No dictionary shenanigans, tables, or linking to Japanese sites. This is all just cosmetic; but ties into the style of the website.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 19 2009, 05:00 PM
Post #10


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



With this HTML:

CODE
<div id="nav">
<a href=""><span class="en">HOME</span> <span class="jp">ホーム</span></a>
<a href=""><span class="en">LINKS</span> <span class="jp">リンクス</span></a>
</div>


you can do it with CSS alone:

CODE

#nav a span.jp {display: none;}
#nav a:hover span.jp {display: inline;}
#nav a:hover span.en {display: none;}


The above should work in IE6, if not perhaps a small bugfix is required, IIRC something like this might work:

CODE
a:hover {position: relative;}


------

(Edit: removed an earlier, unnecessarily complicated solution)

This post has been edited by Christian J: Mar 19 2009, 06:43 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 06:54 AM