1. See it to believe it - Not seeing it!


#1

See It to Believe It. - I tried copying the index.html, stylesheet.css and script.js code to a folder on my desktop to test in a browser (firefox). The squares show up in the index, but they are not interactive like they are in the tutorial. What am I missing here??


#2

Hi Igtats,

You're missing a link to jQuery. Add this just before your link to script.js, and see if it starts working :slight_smile::

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

#3

aha!! - thank you!!!


#4

@zystvan I tried adding the above <script> tag into mine, and I am still stuck with a non-interactive pull tab at the top of my screen. the code I have also works just fine in the editor on codecademy. any ideas?

I previously had thought it was something to do with firewalls and such but it seems that really wasn't the problem


#5

@nickgrimes50 Could you post your HTML and JavaScript code into here so I can see it?


#6

of course:

HTML:

<!DOCTYPE html>
<html>
<head>
	<title> jQuery Pull-Tab </title>
	<script src="https://code.jquery.com/jquery-latest.min.js"></script>
	<script type="text/javascript" src="script.js"></script>
	<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>

<div class="panel">
<br />
<br />
<p> Now you see me! :) </p>
</div>
<p class="slide">
	<div class="pull-me"> Slide Up/Down </div>
</p>

</body>
</html>

JS:

$(document).ready(function() {
	$('.pull-me').click(function() {
		$('.panel').slideToggle('slow');
	});
});

#7

@nickgrimes50 Looks like it should work to me. Can you post a screenshot of the folder you're storing those files in, and the webpage?


#8



#9

@nickgrimes50 Everything looks fine to me :confused:

Can you open your browser developer tools (F12, Shift + Ctrl + I, or right click on the page and select “Inspect element”), then switch over to the “Console” tab in them, and tell me if you see anything there when you load the page and click the thing that says “Slide Up/Down”?

Thanks :slight_smile: