Saturday, May 8, 2010

jquery css problem getting border width - fixed

I had problem getting the border width by calling the css() normaly like this,
$('#id').css("border-width");

I don't know why this don't work but the following works :)

$('#id').css("borderLeftWidth");

3 comments:

  1. (border-width) -> (border_width)

    ReplyDelete
  2. (border-width) -> (border_width) doesn't work ..

    ReplyDelete
  3. Seems to me it's right that border-width does not work, as each side border might be a different width. Which one to return? You have to ask for the specific board: border-top-width, border-right-width, etc.

    ReplyDelete