[jQuery] Re: jQuery and !important

2009-03-30 Thread Martijn Houtman
Hey Sebastian, On Mar 30, 2009, at 4:49 PM, segarva wrote: in my CSS file I have: *{ background-color:#ff!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 p

[jQuery] Re: jQuery and !important

2009-03-30 Thread segarva
Hi Martinjn, in my CSS file I have: *{ background-color:#ff!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

[jQuery] Re: jQuery and !important

2009-03-27 Thread Martijn Houtman
On Mar 27, 2009, at 1:49 PM, weidc wrote: as far as i know it doesn't work with .css(). Thanks, but after some googling (I was unable to find it before), I found: http://dev.jquery.com/ticket/2066 It shows a solution as well. Regards, -- Martijn.

[jQuery] Re: jQuery and !important

2009-03-27 Thread weidc
as far as i know it doesn't work with .css(). On 27 Mrz., 13:36, Martijn Houtman 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