Jim Blum
Jim Blum

Reputation: 2646

$each error after copying code

I have developed a chart using graphael(my question has nothing to do with this), and I am calling an $each function.

When I had my chart at a different project, the function was working fine and the chart was showing correctly. When I copied exactly the same code at a different project, I get the following error

Uncaught TypeError: Cannot call method 'each' of undefined 

Do you know what can be wrong?

Upvotes: 0

Views: 34

Answers (1)

Kevin B
Kevin B

Reputation: 95062

Since you are attempting to execute each as a property of $ and are getting the following error,

Uncaught TypeError: Cannot call method 'each' of undefined 

we can assume that $ is undefined. This is often caused by not including the jquery library in your project.

Upvotes: 1

Related Questions