![]() |
Better "spoiler" tag?
We are trying to figure out how this web page implements their spoiler tag.
[url]https://www.reddit.com/r/dailyprogrammer/comments/3q9vpn/20151026_challenge_238_easy_consonants_and_vowels/[/url] For mobile users it is better because you can click on it to reveal the text. :help: |
I think they just use a [URL="https://jsfiddle.net/m1fhdc5g/"]different style on hover[/URL]. [URL="http://meta.stackexchange.com/questions/1191/add-markdown-support-for-hidden-until-you-click-text-aka-spoilers"]StackExchange has[/URL] a similar setup, but clicking on it [URL="https://jsfiddle.net/ebf2v64e/"]toggles the spoiler class[/URL]. The clicking approach works even better on mobile: the hovering one only works because the invisible cursor happens to be left there if you click on it. Scrolling could undo the spoiler-revealing.
|
I am not so sure it is better. It is easy to accidentally show the text when I only wanted to reposition the cursor. And being required to keep the cursor over the text is annoying because when I want to use the scrollbar to move the display the text disappears again.
|
That "Fiddle" thing is very cool!
:tu: |
[QUOTE=Xyzzy;414019]That "Fiddle" thing is very cool!
:tu:[/QUOTE]Except it is JS uglyness. :yucky::sick: |
Please test the new spoiler tag out.
[spoiler]Hello![/spoiler] We will try to figure out the clicky part next. :mike: |
[QUOTE=Xyzzy;414022]Please test the new spoiler tag out.
[spoiler]Hello![/spoiler] We will try to figure out the clicky part next. :mike:[/QUOTE]Works here as hovering will reveal the text, and selecting will also reveal the text. [spoiler]And doing both hover and select together makes the world explode.[/spoiler] |
[QUOTE=retina;414024]Works here as hovering will reveal the text, and selecting will also reveal the text.[/QUOTE]We only need JS if we want it to be clickable, so maybe this is best?
The time delay for the fade effect can be changed. Right now it is set for two seconds. :mike: |
[QUOTE=Xyzzy;414029]The time delay for the fade effect can be changed. Right now it is set for two seconds.[/QUOTE]I don't see that effect. Everything happens, in what appears to me to be, instantly.
|
Works well in FF 35.0. :smile:
|
Works well in FF 41 too.
The time could be a bit longer, just to avoid revealing by mistake. |
| All times are UTC. The time now is 13:36. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.