Helge
Helge

Reputation: 833

$ is not a function, although jQuery is loaded

Take a look at this site:

http://www.magiskecirkel.no/

It says $ is not a function, although jQuery is loaded.

I know I have asked this question before, and it was fixed, but now apparently the problem is back... So sorry for re-posting, and thanks for all help.

Upvotes: 2

Views: 148

Answers (4)

mcgrailm
mcgrailm

Reputation: 17640

use jQuery noConflict() when using with other libraries

$.noConflict();
jQuery(document).ready(function($) {
  // Code that uses jQuery's $ can follow here.
});

Upvotes: 0

lonesomeday
lonesomeday

Reputation: 237847

For some reason, the last line of your jQuery file is the following:

jQuery.noConflict();

See jQuery.noConflict for what this does.

To get around it, you can use the following way of doing document ready:

jQuery(document).ready(function($) {
    // use jQuery with the $ symbol
});

Alternatively, remove that line from jQuery.js if you can.

Upvotes: 3

CtrlDot
CtrlDot

Reputation: 2513

The error I get is on the line $(document).ready( function($) { You don't need the $ in the function call.

Upvotes: 0

George Cummins
George Cummins

Reputation: 28906

In global.js, can you change this line:

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

to:

$(document).ready( function() {

Upvotes: 1

Related Questions