How do I hide a set of words unless I click on it?
-
Ok, this will take some patience to answer because I am trying to explain it so you can picture my question.
I want to on my blog make a way for if I write a sentence, someone can click either on the actual words or a link at the end of the sentence that will allow the sentence to reveal hidden words. So, basically what I am trying to do is have the words in one sentence, and then you click on a link and it unhides words explaining that sentence in another language. I cannot find an example, but I don’t know how to do it. Ho do I make the whole sentence a link or a link right next to it, so it is smooth. I want to be able to do this for a series of sentences, so you can click it, it unhides the words it is hiding, and then do the same thing, and it will put it back and make it look normal.
Hopefully that makes sense, thanks!
-
Since nobody’s responded to your question yet, I’ll take a stab at an obvious option. You can add hidden words to a sentence if you turn the sentence, or a word at the end of the sentence, into a link, and then have the hidden words appear when someone hovers over the link. That way they don’t even have to click on any links. They can then just move on to another link for new hidden words. And you don’t even have to have the links actually point to anywhere.
-
That would require a javascript mouse-over I think and javascript is not possible in WordPress posts due to security concerns.
It might be possible if you turned the sentence into an image (use the text tool in photoshop or other image editing software to write out your sentence)and then inserted the image into your post. But don’t use a caption or the gallery to insert the image. Upload it then select it from the media library. I have an image on my front page that has hovering text which comes from the title in the image link. (the big weather map)
So if you made an image of the first sentence and gave it the title of the translation of the second sentence. (and the alt tag should have the same info as the title) and inserted it without the gallery or caption it ought to work.
It would be browser dependent (I am using FF3) whether the alt or title would hover.
(Hope this post makes sense) -
@bazaarofdreams, I think rgkillam is referring to title/hover text on links, like [removed on req – Mark] This could be problematic because it relies on a browser’s ability to show the hover text.
-
@justjennifer I see what you (and rgkillam)mean. Its the same thing I am saying with images. Standardization would be soooo nice when it comes to browsers. Then one answer fits all!
I guess I was just thinking about turning the sentence into a link might confuse people into clicking on it before the hover text appears (hey I just did that so learned something) and then they would go nowhere or somewhere unexpected as your link points to. But some explanation as to procedure would cure that.
-
Bwahahahaha! Speaking of relying on browsers, serves me right! OK-just ignore what I said. =:-O
Modlook to remove the idiot link please! Shooting self in foot now…
-
-
Yes it would take a lot of aligning and careful cropping and the like. One could set up an image in photoshop (or whatever) of a precise dimension and then use text of a precise dimension and then put it into a table or list or something. Lot of work.
-
@eschark: As far as I know, an element that changes when you click on it requires javascript, and wordpress doesn’t allow that. A very simple but rather awkward way to do what you are thinking of would be to put links named “Translation” next to each sentence, and have each link lead to a page containing the translation of the particular sentence (these pages can even be in a separate blog).
By the way, in your latest post you got an accidental smilie by writing “:” before “)”. You can get rid of it by going to Settings>Writing and disabling the emoticons option. If you don’t want to lose that option, go to your html post editor and put the bracket like that:
<span>)</span> -
Thanks for all your replies, I need maybe to clarify one thing so I can explain it better, my idea is more of like having the sentence open up similar to the way a Microsoft Vista or XP Folder would open up. For example, you click on the folder and it opens all the contents inside. While I don’t want it to look exactly like that, the idea is the same and that is what I am trying to do. For example, the sentence would be the folder, and once it is opened there would be one folder of words explaining the sentence.
Hopefully that helps more. Thanks so far for all your time and help.
-
-
-
It doesn’t work at all on WordPress.com. You’re going to have to find another workaround.
-
-
Ok, I am really not sure at all what you are saying, only because of my lack of knowledge, but if you can explain what you mean in very simple terms, please do, what are my options?
-
-
Ok, that helps, unless someone else knows otherwise and any tricks. Thanks for your help.
-
Theoretically, you could do it with rollovers, but it would take someone with the knowledge weeks make, and the result would probably be awful.
-
eschark, javascript is code that can do almost anything when put on websites. But it’s not allowed here because of security issues. Problems usually happen and security loopholes can bring down an entire blog host. (was it Typepad or Live Journal that got brought down by java) We bloggers can only use simple html code. Let’s say if you put a poll on your blog. Most WordPress.com blogs will only show the text because WordPress.com doesn’t allow javascript. But if javascript was allowed, the poll would work and count votes from whoever votes when visiting your site. It just does more but it causes more problems as well. You can host your blog yourself but that’s only if you know how and you would have to deal with all the codes and problems and if anything ever goes wrong technically.
- The topic ‘How do I hide a set of words unless I click on it?’ is closed to new replies.