Div Class Specific - jQuery
Page 1 of 1
Div Class Specific - jQuery
I was following a tutorial for changing a post background dependent on forum rank.
However, this code changes the entire post background. I tried changing it to the specific class 'posthead'.
Yet this doesn't seem to work at all (I'm most likely doing something wrong). The code works fine when the $('div.posthead') is removed but affects the wrong areas.
Any help is appreciated!
- Code:
$(function() {
$('div.post:has(".specialpost"), div.postmain:has(".specialpost")').css('background-color','#000');
});
However, this code changes the entire post background. I tried changing it to the specific class 'posthead'.
- Code:
$(function() {
$('div.post:has(".owner"), div.postmain:has(".owner")')$('div.posthead').css('background-color','#3e5591');
});
Yet this doesn't seem to work at all (I'm most likely doing something wrong). The code works fine when the $('div.posthead') is removed but affects the wrong areas.
Any help is appreciated!
Last edited by iProtiige on July 9th 2012, 3:50 pm; edited 1 time in total
iProtiige- New Member
- Posts : 2
Reputation : 1
Language : English
Re: Div Class Specific - jQuery
Turns out I just solved it!
Since div.posthead had the {postrow.displayed.POSTER_RANK_NEW} on it I was able to change the code to have it find the rank off of the posthead rather than the entire post.
Solved
Since div.posthead had the {postrow.displayed.POSTER_RANK_NEW} on it I was able to change the code to have it find the rank off of the posthead rather than the entire post.
- Code:
$(function() {
$('div.head:has(".owner"), div.posthead:has(".owner")').css('background-color','#3e5591');
});
Solved
iProtiige- New Member
- Posts : 2
Reputation : 1
Language : English
Similar topics
» Specific groups for specific forums?
» [Solved] Make specific hover change for specific topics.
» Only members on a specific region are able to see the specific forum
» how do i block a specific sub-forum from a specific user?
» Giving a specific group specific abilities
» [Solved] Make specific hover change for specific topics.
» Only members on a specific region are able to see the specific forum
» how do i block a specific sub-forum from a specific user?
» Giving a specific group specific abilities
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum