Background color for topics that contain a certain string
2 posters
Page 1 of 1
Background color for topics that contain a certain string
I want the topic to have a certain bgcolor if the topictitle contains the string "New"
Thanks :3
Thanks :3
Re: Background color for topics that contain a certain string
Is it for a phpBB3 forum? Then you can try this javascript. It will add 'selected' to the rows of the topic with 'new' in their titles.
- Code:
$(function() {
var str = 'new';
$('ul.topiclist.topics li.row').each(function() {
var title = $(this).find('a.topictitle').html();
if(title.toLowerCase().indexOf(str) >= 0) {
$(this).addClass('selected');
}
});
});
10spetter10- Forumember
- Posts : 195
Reputation : 82
Language : Dutch
Similar topics
» Add options, appearing at the top of topics to change the background color, text, and codes
» [background color update]-I want the code to change the background color
» Problems with the background color on a 'Quote on Quote' response and problems with the background color on my 'Quick Reply' box
» Background color and text color by rank
» Number of posts and topics background
» [background color update]-I want the code to change the background color
» Problems with the background color on a 'Quote on Quote' response and problems with the background color on my 'Quick Reply' box
» Background color and text color by rank
» Number of posts and topics background
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum