We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Background colouring
Topic Started: May 18 2013, 07:42 PM (249 Views)
SkillrzUnite
Member
[ *  * ]
Hey, I was wondering if it was possible to colour a certain users background when they have posted a reply to a topic. Such as making the background of the text a light blue colour or any colour that I could use. I only want the background of their posts to be coloured. If it is possible, could anyone help me and if you can.. Thanks in advance! :)
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
function changeBG(username, color) {
$('tr[id*="post-"]').each(function () {
var user = $(this).find('td.c_username a').text();

if (username === user) {
$(this).next('tr').find('td.c_post').css('background', color);
}
});
}

changeBG('USERNAME', 'COLOR');
changeBG('USERNAME', 'COLOR');
changeBG('USERNAME', 'COLOR');
//]]>
</script>
Change the capitalized text as necessary and you can have as many of the changeBG lines as you like.
Offline Profile Goto Top
 
SkillrzUnite
Member
[ *  * ]
Thanks, it worked!
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic