confused and dazed Posted August 20, 2016 Share Posted August 20, 2016 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 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> 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 Link to comment Share on other sites More sharing options...
dsonesuk Posted August 20, 2016 Share Posted August 20, 2016 When you view source of page with your original jquery link and click that link, does it open the jquery file in question. Link to comment Share on other sites More sharing options...
confused and dazed Posted August 20, 2016 Author Share Posted August 20, 2016 It does not... But all the other jquery functions on my page are working though... just not the fadeOut Link to comment Share on other sites More sharing options...
dsonesuk Posted August 20, 2016 Share Posted August 20, 2016 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. Link to comment Share on other sites More sharing options...
confused and dazed Posted August 20, 2016 Author Share Posted August 20, 2016 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now