0

I'm getting an error with my jQuery.

Uncaught TypeError: Property '$' of object [object Object] is not a function jquery.custom.js:19


portfolio_quicksand jquery.custom.js:19
(anonymous function) jquery.custom.js:71
l jquery.js:2
c.fireWith jquery.js:2
v.extend.ready jquery.js:2
A jquery.js:2

This is the line 19 of the javascript. It looks fine to me. Any thoughts would be great! $filter = $('.filter li.active a').attr('class');

I'm calling jQuery like the following...

 jQuery(document).ready(function() {
 }
bryanlewis
  • 577
  • 3
  • 10
  • 27

2 Answers2

0

try :

$(document).ready(function(){...})

$ is just a short cut for jQuery(document).ready(function() {}

Are you sure you are using jQuery or Java in your custom script (line 19) ?

Katie Kilian
  • 6,815
  • 5
  • 41
  • 64
Daragh
  • 123
  • 3
  • 13
  • Here is the script that isn't working. getting the error on line 7. http://pastie.org/6395170 – bryanlewis Mar 05 '13 at 20:08
  • @b-lew where is the script? – Peeyush Mar 05 '13 at 20:09
  • Source code says I'm using /jquery.js?ver=1.8.3 Wordpress loads this by default. – bryanlewis Mar 05 '13 at 20:10
  • @Peeyush I've pasted the link above ^ – bryanlewis Mar 05 '13 at 20:11
  • Awww, it's in word press. Totally different kettle of fish, Have you tried manually installing jQuery to the header.php file ? – Daragh Mar 05 '13 at 20:11
  • @b-lew okay that's good... i just pasted the answer also for you. If it worked for you then please accept is as a solution. – Peeyush Mar 05 '13 at 20:18
  • @b-lew , I know it's just code but word press have a funny way of dealing with jQuery. When I am dealing with themes I usually have to import jQuery in the header.php cause it is never link correctly through the word press method. – Daragh Mar 06 '13 at 09:10
0

Can you just try this jQuery(document).ready(function($) { //your code here });

Peeyush
  • 4,728
  • 16
  • 64
  • 92