0

jQuery-Lint is throwing the following error for me:

$(".around_divboxes").css is not a function
   $('.around_divboxes').css('marginLeft', '0px'); 

Can someone tell me why it throws this error, and how to solve it?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Raphael
  • 673
  • 1
  • 9
  • 27
  • It definitely is a function. Very strange. I did notice that you have marginLeft however, which should be margin-left. – Ant Jul 20 '11 at 12:41
  • 2
    I have seen this when the jquery core js has not been loaded. Make sure the jquery.js is loading on the page. – jk. Jul 20 '11 at 12:42
  • @Ant the "marginLeft" is correct :) jquery is a little different you cant use "margin-left" – Raphael Jul 20 '11 at 12:49
  • @jen I think your Comment solve the problem, I tested it on "onLoad" if I switch to "onDomReady" it dosnt trow a error. Write your anser below, that I can vote it for best, thx – Raphael Jul 20 '11 at 12:50

1 Answers1

3

I have seen this when the jquery core js has not been loaded. Make sure the jquery.js is loading on the page.

jk.
  • 14,365
  • 4
  • 43
  • 58