Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with jquery and javascript - new version not working?

    I'm trying to work out this site on CargoCollective and doing my best to figure out javascript....
    When I go into the custom HTML panel and put in this code, it seems to work fine....


    Code:
        <!DOCTYPE html>
    <html lang="en">
    <head>
    
         <title>jquery</title>
         <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
        
         <title>modernizer</title>
         <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.0.6-development-only.js"></script>
         
    </head>
    </html>

    however, when I enter in this code, it doesn't....


    Code:
        
        <!DOCTYPE html>
    <html lang="en">
    <head>
    
         <title>jquery</title>
         <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        
         <title>modernizer</title>
         <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.0.6-development-only.js"></script>
         
    </head>
    </html>

    What happens when I enter this code in is when I click the first splash page it doesn't take me to the website, instead it does nothing and there is a little message
    at the border of my browser that states "javascript:void(0)"

    My questions - am I doing at least one of these right? What is this javascript void message and isn't this just the same script but an updated version of jquery?
    Also, when using the "builtwith" plugin to see what my site has running, when using the code that works (or at least i think it's working), it states that I am using javascript 1.6.1 AND 1.9.0 -
    what's up with that?

    Thank you to anyone with advice.

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,969
    Thanks
    56
    Thanked 557 Times in 554 Posts
    at first glance, this:
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
    is the jQuery ui plugin (which I am unsure would be of any use without jQuery loaded)

    whereas this:
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    is the actual jQuery framework

    so you are not loading an updated version of the same script, but rather a different script altogether

    I don't know if that's your problem, but I would be surprised if it isn't causing some sort of hiccup


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •