JavaScript doesn't work in my browser but works in CodePen

Roland Jegorov

It's very strange and, as I do not have much experience yet, I don't understand the problem of my JavaScript not working. I made a ToTop button.

In CodePen it works fine. As I scroll down it fades in & out. CodePen: http://bit.ly/1ttnjRi

But in Chrome it does nothing. Also, I sent all files to a friend and he had the same problem.

Can someone help me? Thanks!

UPDATE:

Debug console gives this: Uncaught ReferenceError: $ is not defined

P.S. What is the purpose of down voting? Possibly I am not the only one newbie encountering this problem. I guess stackoverflow is for helping each other in the uneasy coding stuff, not bragging about knowing something more and because of that being arrogant. Have a nice day! :)

Dave

You need to include jQuery by adding this to your HTML:

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Link doesn't work in JSFiddle but works in CodePen

From Dev

stringify doesn't works with my javascript array

From Dev

Why doesn't [CSS feature] work in [browser] but works in others?

From Dev

split('\n') doesn't work in the browser but works in jsbin

From Dev

Js does not work as expected on my website even it works on codepen

From Dev

My JavaScript doesn't work with chrome

From Dev

Why doesn't my Javascript if else work?

From Dev

my anonymous function in javascript doesn't work

From Dev

My JavaScript doesn't work with chrome

From Dev

Calling my Javascript function doesn't work

From Dev

Why doesn't my Javascript if else work?

From Dev

My Javascript code doesn't work properly

From Dev

My javascript calculator doesn't work

From Dev

WAMP my own internal ip doesn't work on browser

From Dev

Javascript works in JS Fiddle but doesn't work in Chrome/IE

From Dev

This Javascript doesn't work in IE but works in Chrome, Firefox and Opera

From Dev

Javascript works in JS Fiddle but doesn't work in Chrome/IE

From Dev

Code works on codepen but not on my site

From Dev

Simple javascript code for a button doesn't work in any browser

From Dev

Simple javascript code for a button doesn't work in any browser

From Dev

The Javascript window navigator browser name doesn't work in chrome

From Dev

Why doesn't node run javascript functions in my terminal or browser?

From Dev

Why my own "toString()" function doesn't work in my javascript?

From Dev

PHP Curl script works from browser, doesn't work as Cron Job

From Dev

React Application works in browser but doesn't work in Cefsharp. Probably "Provisional headers are shown" issue

From Dev

HDMI cable specifically doesn't work with my computer, works with everything else, all ports of video card work

From Dev

Python code that works fine on my PC doesn't work on my Raspberry Pi

From Dev

When I try pause and play in jsFiddle, my code works but it doesn't work in my html page

From Dev

Javascript onClick() doesn't work for my button to calculate form inputs?

Related Related

  1. 1

    Link doesn't work in JSFiddle but works in CodePen

  2. 2

    stringify doesn't works with my javascript array

  3. 3

    Why doesn't [CSS feature] work in [browser] but works in others?

  4. 4

    split('\n') doesn't work in the browser but works in jsbin

  5. 5

    Js does not work as expected on my website even it works on codepen

  6. 6

    My JavaScript doesn't work with chrome

  7. 7

    Why doesn't my Javascript if else work?

  8. 8

    my anonymous function in javascript doesn't work

  9. 9

    My JavaScript doesn't work with chrome

  10. 10

    Calling my Javascript function doesn't work

  11. 11

    Why doesn't my Javascript if else work?

  12. 12

    My Javascript code doesn't work properly

  13. 13

    My javascript calculator doesn't work

  14. 14

    WAMP my own internal ip doesn't work on browser

  15. 15

    Javascript works in JS Fiddle but doesn't work in Chrome/IE

  16. 16

    This Javascript doesn't work in IE but works in Chrome, Firefox and Opera

  17. 17

    Javascript works in JS Fiddle but doesn't work in Chrome/IE

  18. 18

    Code works on codepen but not on my site

  19. 19

    Simple javascript code for a button doesn't work in any browser

  20. 20

    Simple javascript code for a button doesn't work in any browser

  21. 21

    The Javascript window navigator browser name doesn't work in chrome

  22. 22

    Why doesn't node run javascript functions in my terminal or browser?

  23. 23

    Why my own "toString()" function doesn't work in my javascript?

  24. 24

    PHP Curl script works from browser, doesn't work as Cron Job

  25. 25

    React Application works in browser but doesn't work in Cefsharp. Probably "Provisional headers are shown" issue

  26. 26

    HDMI cable specifically doesn't work with my computer, works with everything else, all ports of video card work

  27. 27

    Python code that works fine on my PC doesn't work on my Raspberry Pi

  28. 28

    When I try pause and play in jsFiddle, my code works but it doesn't work in my html page

  29. 29

    Javascript onClick() doesn't work for my button to calculate form inputs?

HotTag

Archive