![]() | |
#1
| |||
| |||
|
|
Hmm, maybe I should try again in English. ;-) A ruby markup such as ruby><rb>廃棄</rb><rp>(</rp><rt>ハイキ</rt><rp>)</rp></ruby is 'honoured' by Internet Explorer, but not by Netscape* so in IE you get furigana. On browsers that dont support ruby it declines 'gracefully' to 廃棄(ハ イキ) (e.g. to word + reading). However if you prefer to see 廃棄 instead of 廃棄(ハイキ) for browsers that dont support ruby then a <span style='display:none'> would hide the reading. Given that I know of no browser that supports <ruby> but doesn't support <span style='display:none'> it would be a very stupid thing to do. |
#2
| |||
| |||
|
|
Paul Blay hu kiteb: Hmm, maybe I should try again in English. ;-) A ruby markup such as ruby><rb>廃棄</rb><rp>(</rp><rt>ハイキ</rt><rp>)</rp></ruby is 'honoured' by Internet Explorer, but not by Netscape so in IE you get furigana. On browsers that dont support ruby it declines 'gracefully' to 廃棄(ハ イキ) (e.g. to word + reading). However if you prefer to see 廃棄 instead of 廃棄(ハイキ) for browsers that dont support ruby then a span style='display:none'> would hide the reading. Given that I know of no browser that supports <ruby> but doesn't support <span style='display:none'> it would be a very stupid thing to do. function ShowKanji() { document.rb.style.display='inline'; document.rp.style.display='none'; document.rt.style.display='none'; } function ShowFurigana() { document.rb.style.display='none'; document.rp.style.display='none'; document.rt.style.display='inline'; } Would these do what i think they would do? |
|
Couple those functions with an appropriate user interface, and you could show the kanji or hiragana easily. |
#3
| |||
| |||
|
|
"Fabian" wrote ... Paul Blay hu kiteb: Hmm, maybe I should try again in English. ;-) A ruby markup such as ruby><rb>廃棄</rb><rp>(</rp><rt>ハイキ</rt><rp>)</rp></ruby is 'honoured' by Internet Explorer, but not by Netscape so in IE you get furigana. function ShowKanji() { document.rb.style.display='inline'; document.rp.style.display='none'; document.rt.style.display='none'; } function ShowFurigana() { document.rb.style.display='none'; document.rp.style.display='none'; document.rt.style.display='inline'; } Would these do what i think they would do? I compliment you on your bravery in cross-posting to c.l.j ;-) So here I go risking showing off my ignorance as well. |
|
I've no idea how it would work on hypothetical browsers that support javascript and styles but dont support ruby. |
#4
| |||
| |||
|
|
Just tested it; it doesn't work. I realise my mistake. That format is for manipulating tags whose ID attribute has been set, and not for manipulating tags directly. Anyone know the correct way to manipulate the style for an entire tag? |
|
I've no idea how it would work on hypothetical browsers that support javascript and styles but dont support ruby. Assuming the browser has a document object model that allows manipulation of arbitrary html tags, |
|
but doesnt recognise RUBY, the principle is still sound. manipulating the RP tag is necessary in this case to avoid having plain hiragana display inside parenthesis. |
#5
| |||
| |||
|
|
"Fabian" wrote ... Just tested it; it doesn't work. I realise my mistake. That format is for manipulating tags whose ID attribute has been set, and not for manipulating tags directly. Anyone know the correct way to manipulate the style for an entire tag? |
|
Lots of people, but obviously I've forgotten. |
![]() |
| Thread Tools | |
| Display Modes | |
| |