Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Antonio De Rose
20,886 PointsIn the launch workspace, for JQuery basics, jQuery(".warning").hide(); does not work
I am working on the launch workspace, and did the coding 'jQuery(".warning").hide()', to hide the css selector, but it is not hidden, when it is fired.
12 Answers
Dylan Pereira
15,141 PointsHi,
Make sure the jquery file is linked in your html code. make sure that the script src="app.js" /script is defined in your html code. Also make sure to define your jquery library
script src="https://code.jquery.com/jquery-2.2.3.js" /script
There could be other issues as well.
Antonio De Rose
20,886 PointsHi Dylan,
All of the above is included, and it does not work, I have hidden it, still it showing.
Thanks,
Antonio
Dylan Pereira
15,141 PointsHi Antonio,
Can you try $(".warning").hide(); ?
Also, make sure that you have a class on your html tags, something like:
<div class="warning">
<p> this is a warning </p>
</div>
Sometimes, also the browser caches jquery, make sure you hit refresh, at least a couple of times
Antonio De Rose
20,886 PointsHi Dylan,
I think there is some other problem, even that does not work, taking all the contents out from the html file too, brings in the image, where the image shouldn't have come.
Thanks,
Antonio
Dylan Pereira
15,141 PointsThere is something wrong with the html or css. That is unusual behavior. Are you sure you are linking the css correctly on the html file. Could you share the code with me ? Just launch the code in workspace window and at the top right, you will see "Fork Workspace" ,click on that icon , change the name of the workspace and then copy the URL at the top of the window.
Antonio De Rose
20,886 PointsAntonio De Rose
20,886 PointsDylan Pereira
15,141 PointsHi,
I cannot access the link, it says "link not found" i think you closed the workspaces window. Can you keep the workspaces window open and then share the workspace with me?
Antonio De Rose
20,886 PointsTry now please.
Dylan Pereira
15,141 PointsMy earlier instructions did not work. Can you please follow these instructions below to share the workspace,
1.Launch any of your workspaces. 2.Select the snapshot menu in the upper right corner. 3.Click "Take Snapshot"
- Visit the link and share it with someone.
The link URL should look something like this https://w.trhou.se/zbznfbg3sv
Antonio De Rose
20,886 Pointsdonno would this, depend on the computer locking too, by the way, snapshot link, https://w.trhou.se/4qey11ep8j
Dylan Pereira
15,141 PointsHi Antonio,
I tried your code on my workspace and it works perfectly fine. The ".warning" has disappeared. Maybe, you have disabled javascript on your browser, Try opening the same workspace in different browsers like Firefox or IE or Chrome. Or make sure you have activated Javascript is working.
Check the followling link https://www.whatismybrowser.com/detect/is-javascript-enabled to see if your javascript is enabled.
Antonio De Rose
20,886 PointsHi Dylan,
First of all, sorry for the late reply, this works like a charm for me, all these time, I was refreshing using the enter, and that had been the reason, not to show, with the effective changes. thank you very much.
Thanks,
Antonio