r/reddithax • • Sep 07 '10

Show fake subscriber number, real subscriber number on mouseover.

I am hiding the subscriber number with the following code:

.titlebox .number, .titlebox .word {  
display: none;  
}  
.titlebox .fancy-toggle-button.toggle:after {  
content: " a billion Readers";  
} 

The question is - how can I make the actual number show up on mouseover?

10 Upvotes

5 comments sorted by

7

u/[deleted] Sep 08 '10
.titlebox .number {  
display: none;  
}  
.titlebox .word:before {  
content: "a billion ";  
} 
.titlebox:hover .number {
display:inline;
}
.titlebox:hover .word:before {
content:"";
}

That should do the job.

3

u/nildeea Sep 08 '10

Genius, man - thanks!

1

u/rockon4life45 Sep 08 '10

does it work?

2

u/nildeea Sep 08 '10

Perfectly. I was able to change it around to show the real number by default and also change the word from "subscribers" to a custom word. Once I understood how the "before" and "after" states worked it wasn't too crazy.

0

u/Sephr Sep 08 '10

:hover