Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: $(...).on is not a function #55

Open
balawton opened this issue Apr 26, 2016 · 15 comments
Open

Uncaught TypeError: $(...).on is not a function #55

balawton opened this issue Apr 26, 2016 · 15 comments

Comments

@balawton
Copy link

I get the above error when I try and open the example files

@andypillip
Copy link

Are you using jQuery? In which Version?

If you're using jQuery, are you using another library that might bind to $?

@brendanlawton
Copy link

Hi Andy, I haven't changed any of the files, just downloading and then opening the examples.

@andypillip
Copy link

You downloaded the repository from github and opened the html files in /example?

I checked those, none of them is calling .on().

As they use old jQuery, they use the .bind() and .live() functions.

@ghost
Copy link

ghost commented Dec 21, 2016

Hey Andy,

Just download the files and opened the examples, nothing works and have this issue Uncaught TypeError: $(...).on is not a function (jquery 1.4.4). Using FF 50.1.0 And Chrome 55.0.2883.87 m (64-bit). Thank you

@andypillip
Copy link

@Gnomal again, please tell me where you downloaded these files!

@ghost
Copy link

ghost commented Dec 22, 2016

@andypillip https://github.com/protonet/jquery.inview Here :) Once one by one, once by ZIP

@andypillip
Copy link

@Gnomal it's that the example files are broken.

According to the README jquery.inview requires jQuery ≥ 1.8, while the example filese still reference 1.4.

As a workaround you can alter the example files and use an up-to-date jQuery.

F.e. in advanced.html, replace the line

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

with

<script src="https://code.jquery.com/jquery-1.8.0.min.js"></script>

The method bind() got deprecated only in 3.0, so the examples should work with jQuery < 3.0.

@naserinassab
Copy link

thank you

@bhanupsc
Copy link

var jqueryObj = $;
use jqueryObj in place of $

@romuye123
Copy link

Downloaded this template:
https://colorlib.com/download/132/

Works fine on localhost. But get following error on my cloud server:

Uncaught TypeError: $(...).easyResponsiveTabs is not a function
at responsiveTabs (main.js:168)
at HTMLDocument. (main.js:398)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.J (jquery.min.js:2)
NOTE: This error is appearing on MAC Chrome browser. Working fine on other browsers.

@pavanvarmab
Copy link

if not the jquery version error once clear the catch of your browser because of the Jquery files already present in the cache it will cause the problem

@onewheelash
Copy link

if not the jquery version error once clear the catch of your browser because of the Jquery files already present in the cache it will cause the problem

Thanks for the tip. Clearing my cache got took care of the Uncaught TypeError: $(...) console error.

@CristianAlvG
Copy link

I could solve the problem, i had installed bootstrap with JQuery and his library was changing my js and the way it works, so i decided to delete the JQuery Bootstrap href and it solves my problems thanks to andyphillip

@VijayGawade
Copy link

use 'jQuery' instead of '$'.
thats work for me

@mh27588
Copy link

mh27588 commented Jun 18, 2021

I could solve the problem, i had installed bootstrap with JQuery and his library was changing my js and the way it works, so i decided to delete the JQuery Bootstrap href and it solves my problems thanks to andyphillip

This was absolutely the issue for me as well, 2 years on! Thank you @CristianAlvG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants