[Solved] Make specific hover change for specific topics.
2 posters
Page 1 of 1
[Solved] Make specific hover change for specific topics.
Uh, I wanna know how to make topics with a specific line of text change into a specific color.
For example, topics with "solved" in them, will hover to green and
Topics with "unsolved" will hover to red.
Can someone tell me how to do this? If not can you tell me how to make a whole specific thread like "Application #1 [Solved]" fade to green?
Thanks
For example, topics with "solved" in them, will hover to green and
Topics with "unsolved" will hover to red.
Can someone tell me how to do this? If not can you tell me how to make a whole specific thread like "Application #1 [Solved]" fade to green?
Thanks
Last edited by Ace 1 on May 27th 2015, 1:14 pm; edited 1 time in total
Re: [Solved] Make specific hover change for specific topics.
That would require javascript to perform a search of the node's textual content. Then if it contains a certain sequence of characters, you can add a classname to it. Here's an example using a regular expression + loop for the links.
- placement should be in all the pages or sub-forums
Then you should be able to use CSS :
- placement should be in all the pages or sub-forums
- Code:
$(function() {
for (var a, b = document.getElementsByTagName('A'), i = 0; a = b[i]; i++) {
if (/\[solved\]/i.test(a.innerHTML)) a.className += ' solved';
}
});
Then you should be able to use CSS :
- Code:
a.solved:hover { color:green !important }
Similar topics
» How do I make someone or a specific group in charge of a specific forum/category?
» Is there a way I can make it so only I, an admin, can make threads in a specific forum?
» Hide topics from specific member
» Recent Topics of a specific forum
» First post reminder in specific topics
» Is there a way I can make it so only I, an admin, can make threads in a specific forum?
» Hide topics from specific member
» Recent Topics of a specific forum
» First post reminder in specific topics
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum