I have div with a table inside. Inside the td elements of the table, I have text and some links that have ‘actionLink’ class assign.
Using JQuery, I change some attribute values to the td and p elements inside the parent div. All works fine, but that the attribute values for a links also change.
Is there a way to change this attributes without affecting the a elements.
This is what I have
JavaScript
$('.sectionContent').css("color", $('#ParagraphForegroundColor').val());
$('.sectionContent').css("background-color", $('#ParagraphBackgroundColor').val());
$('.sectionContent p, .sectionContent td').not(".addColumn").css("font-family", $('#ParagraphFontFamily').val());
$('.sectionContent p, .sectionContent td').not(".addColumn").css("font-size", $('#ParagraphFontSize').val());
$('.sectionContent p, .sectionContent td').not(".addColumn").css("font-style", $('#ParagraphFontStyle').val());
$('.sectionContent p, .sectionContent td').not(".addColumn").css("font-weight", $('#ParagraphFontWeight').val());
$('.sectionContent p, .sectionContent td').not(".addColumn").css("text-decoration", $('#ParagraphTextDecoration').val());
Actually, I think you simply need to define the class actionLink in css so that it doesn’t inherit the properties of the TD that’s containing it.
Something like
EDIT :
For Instance, this works fine: