I found this lovely toggle script to alter an elemants class:
$( "button" ).on( "click", function() {
$( "p" ).toggle();
} );
the result is all <p> disappearing, which i use throughout my design.
and lets say <p> has this styling :
p {font-size:2em; color:red; float:right;}
is there a way to alter JUST the font color without the entire <p> vannishing?
Ive tried ( "p.color" ), ( "p/color" ), ( "p:color" ), ( "p,color" )
any help would be appreciated
$( "button" ).on( "click", function() {
$( "p" ).toggle();
} );
the result is all <p> disappearing, which i use throughout my design.
and lets say <p> has this styling :
p {font-size:2em; color:red; float:right;}
is there a way to alter JUST the font color without the entire <p> vannishing?
Ive tried ( "p.color" ), ( "p/color" ), ( "p:color" ), ( "p,color" )
any help would be appreciated