in my CSS file I have:
*{
background-color:#ffffff!important;
}
.destacado{
background-color:green!important;
}
and, in my jQuery code:
$("a").click(function(){
$("p:last").addClass("destacado");
}
and it's working fine! the last paragraph is converted to green using !
important and addClass method.
try it.
regards
sebastian
On 27 mar, 14:36, Martijn Houtman <martijn.hout...@gmail.com> wrote:
> Hello,
>
> I know I should actually avoid using !important, but nonetheless I'd
> like to set it using jQuery's css(), but it seems to ignore setting
> this property completely. Anyone knows if this is supposed to work or
> why it does not?
>
> Regards,
> --
> Martijn.
No comments:
Post a Comment