Jump to content
confused and dazed

Webpage not exeuting fadeOut from my <link> .jquery library

Recommended Posts

Hello internet.

I am trying to use the following code and my webpage is not accepting my fadeOut function I'm using <link> to grab the jquery library from my server.

 

CODE:

$("div").click(function() {
$(this).fadeOut("slow");
});
However, if I replace
<script type="text/javascript" src="jquery.min.js"></script>
WITH
It works just fine.
Why is this?
NOTES:
1. I am placing jquery code within my <head> tags.
2. jquery.min.js is the 3.1.0 compressed file I have on my server

Share this post


Link to post
Share on other sites

If it is a link and you click it, it should show the jquery code from that link, if not! and comes up as error 404 not found. the path is not correct. The div fadeOut code as it is! MUST BE place below ALL div elements as well.

Share this post


Link to post
Share on other sites

I did some basic internet searching of the error I got clicking on the view source - inspect - .js link

the error is "Not allowed to load local resource" the answers were jquery is not allow to access your local files. I actually don't have it in my server I miss-spoke about about. I just have it in my local files. I'm sure you would have mentioned that had I not misled you. thanks for pointing out that I can use view source and click on links use inspect to view errors on that. THANKS!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...