The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Special post color problem! [help please]

View previous topic View next topic Go down

In progress Special post color problem! [help please]

Post by axiom on April 10th 2012, 2:21 am

I am adding it so a moderators post background color is green, and there font is black.

The only part NOT working is the font coloring part, the post background color IS working

Code:
$(function() {
$('tr.post:has(".specialpost2") td').css('background-color','#186111');
});

$(function() {
$('tr.post:has(".specialpost2") td').css('font-color','#000000');
});

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

In progress Re: Special post color problem! [help please]

Post by axiom on April 10th 2012, 6:03 am

^ didnt work:(

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

In progress Re: Special post color problem! [help please]

Post by SLGray on April 10th 2012, 6:14 am

Change 'background-color':'#186111','font-color':'#000000' to
'background-color','#186111','font-color','#000000'


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2447
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: Special post color problem! [help please]

Post by LGforum on April 10th 2012, 6:25 am

Have people not thought about doing this:
Code:

$(function() {
$('tr.post:has(".specialpost2") td').addClass('staffpost');
});

And then just styling it in the CSS? with
Code:

.staffpost {
  styling ...
}

Razz

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: Special post color problem! [help please]

Post by LGforum on April 10th 2012, 4:54 pm

FYI Rideem this code has an error in:
Code:
$(function() {
$('tr.post:has(".specialpost2") td').css({'background-color':'#186111','font-color':'#000000');
});
Your missing the second '}' in the CSS() parameter.

For adding multiple CSS rules using jQuery you send an object in.
Code:

jQuery(selector).css({
      'color' : '#fff',
      'background' : '#000',
      'font-weight' : 'bold'
});

Just a regular Javascript Object structure.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: Special post color problem! [help please]

Post by axiom on April 10th 2012, 11:43 pm

Wait what, can you just tell me what to paste in the javascript and css Razz

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum