[jQuery] Re: addClass('floatsToRight') doesn't work, but .css('float', 'right') does

2009-12-11 Thread Łukasz Podolak
Yes, you were both right. Many thanks

On 10 Gru, 21:01, MorningZ morni...@gmail.com wrote:
 that would have been my suggestion as well   Firebug would be a
 huge help for you here, as floatsToRight will show in the HTML tab
 as over ridden if that's the case

 On Dec 10, 2:54 pm, Leonardo K leo...@gmail.com wrote:

  Maybe you have a style that override the float right property.

  2009/12/10 Łukasz Podolak lukasz.podo...@gmail.com

   Hey,

   I have one css clas, that looks like this:

   .floatsToRight {
          float: right;
   }

   my jquery code is doing the following:
   $('ul.gallery li:not([class=main]) div.title:even').addClass
   ('floatsToRight')

   however, this class is not applied. Instead, if I use the direct css,
   it works:

   $('ul.gallery li:not([class=main]) div.title:even').css('float',
   'right')

   What's more interesting, having defined a sample class like:

   .yellowBorder{
          border: solid 1px yellow;
   }

   the code:
   $('ul.gallery li:not([class=main]) div.title:even').addClass
   ('yellowBorder')
   works!

   so, is there anything special that I can't apply classes that set the
   float property? or is this a bug?
   thanks




[jQuery] Re: addClass('floatsToRight') doesn't work, but .css('float', 'right') does

2009-12-10 Thread MorningZ
that would have been my suggestion as well   Firebug would be a
huge help for you here, as floatsToRight will show in the HTML tab
as over ridden if that's the case

On Dec 10, 2:54 pm, Leonardo K leo...@gmail.com wrote:
 Maybe you have a style that override the float right property.

 2009/12/10 Łukasz Podolak lukasz.podo...@gmail.com

  Hey,

  I have one css clas, that looks like this:

  .floatsToRight {
         float: right;
  }

  my jquery code is doing the following:
  $('ul.gallery li:not([class=main]) div.title:even').addClass
  ('floatsToRight')

  however, this class is not applied. Instead, if I use the direct css,
  it works:

  $('ul.gallery li:not([class=main]) div.title:even').css('float',
  'right')

  What's more interesting, having defined a sample class like:

  .yellowBorder{
         border: solid 1px yellow;
  }

  the code:
  $('ul.gallery li:not([class=main]) div.title:even').addClass
  ('yellowBorder')
  works!

  so, is there anything special that I can't apply classes that set the
  float property? or is this a bug?
  thanks