This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Amy Liu
over 9 years

Why doesn't the carousel code work outside of Codecademy?

I am trying to add the carousel code I learned from the flipboard website in my own code; however, the actual buttons don’t work (left and right buttons) even though I copied the html,css,and js straight from the course…why is that? How can I fix it? The buttons work on sandbox websites like jsfiddle, but not with my files…

Answer 543cb7689c4e9d945f001118

0 votes

Permalink

Chances are you haven’t loaded the necessary jQuery library components; nor, Bootstrap, one could imagine. These are vital components.

points
Submitted by Roy
over 9 years

2 comments

Roy over 9 years

Change //ajax. … to http://ajax. …. Our computer cannot resolve a schemeless protocol. We have to provide the http schema else our local machine resolves to localhost, 127.0.0.1. We need http to get us on to the web from our local machine.

Roy over 9 years

Bottom line, this code works fine outside of codecademy. It’s expected to. Take it as fundamental material to build upon, and move on. You learn what you learn. Hopefully that includes some of the Q&A.

Answer 543e7bce7c82ca8c63001b34

0 votes

Permalink

Same thing is happening with me i just copied and past the 3 files (css/js/html), but the events are not working..

points
Submitted by Aiz Al Arab
over 9 years

1 comments

Aiz Al Arab over 9 years

Note : i tried to change the link to http but i got the same result

Answer 54edc728e39efe28820015bf

0 votes

Permalink

link href=”http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css“ rel=”stylesheet”

link href=’http://localhost:8080/web/css/style.css‘ rel=’stylesheet’

script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js“ /script script src=”http://localhost:8080/web/js/app.js“ /script

my apache busy thats why port with 8080 you can put localhost itself and add http to Ajax and Bootsrap

points
Submitted by umidjonmamatov
about 9 years

Answer 54edc740e39efefae6001684

0 votes

Permalink

link href=”http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css“ rel=”stylesheet”

link href=’http://localhost:8080/web/css/style.css‘ rel=’stylesheet’

script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js“ /script script src=”http://localhost:8080/web/js/app.js“ /script

my apache busy thats why port with 8080 you can put localhost itself and add http to Ajax and Bootsrap

points
Submitted by umidjonmamatov
about 9 years