Applying class styles with jquery, but not all styles are applying

Foscomofuch

New Member
I am attempting some beginner manipulation of applying a CSS class style using jquery. I am setting two class attributes, color and font size. Both Defined under the class .zebra, yet only the color is being applied.Jquery script:\[code\]$(document).ready(function() {alert('Script is tied in!');$('#lion').addClass('zebra');});\[/code\]CSS\[code\]p {color: #CC34H8;font-size: 100px;}.zebra {color: #2FB51D;font-size: 12px;}\[/code\]EJS, still basically straight HTML markup at this point\[code\]<body>hello hello<p> hi </p><div id="lion"> <p> hey hey </p></div></body>\[/code\]The color attribute from the CSS is changing, but the font is not (still displaying as the 100px from the original \[code\]<p>\[/code\] defined style. Why is only one of the attributes being affected?
 
Back
Top