Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. jQuery not working

jQuery not working

Scheduled Pinned Locked Moved JavaScript
javascripthtmlwindows-adminhelpquestion
7 Posts 5 Posters 14 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hans Ruck
    wrote on last edited by
    #1

    Hello all, I am using the Chrome browser to run a simple html test page containing jQuery code. If I load it from the disk path, it works as expected. If, instead, I use the IIS, then it gives the $ is not defined error. Funny enough, using the incognito mode makes it work :wtf: Any idea about what could be wrong here?

    Bogdan Rechi.

    C S S M 4 Replies Last reply
    0
    • H Hans Ruck

      Hello all, I am using the Chrome browser to run a simple html test page containing jQuery code. If I load it from the disk path, it works as expected. If, instead, I use the IIS, then it gives the $ is not defined error. Funny enough, using the incognito mode makes it work :wtf: Any idea about what could be wrong here?

      Bogdan Rechi.

      C Offline
      C Offline
      cjoki
      wrote on last edited by
      #2

      A code sample may help.

      Chris J www.redash.org

      H 1 Reply Last reply
      0
      • H Hans Ruck

        Hello all, I am using the Chrome browser to run a simple html test page containing jQuery code. If I load it from the disk path, it works as expected. If, instead, I use the IIS, then it gives the $ is not defined error. Funny enough, using the incognito mode makes it work :wtf: Any idea about what could be wrong here?

        Bogdan Rechi.

        S Offline
        S Offline
        Shahriar Iqbal Chowdhury Galib
        wrote on last edited by
        #3

        Hi, you need to provide your HTML code where you referenced the jQuery in order to investigate the issue. As of now it seems you are missing relative path respect to your application.

        1 Reply Last reply
        0
        • C cjoki

          A code sample may help.

          Chris J www.redash.org

          H Offline
          H Offline
          Hans Ruck
          wrote on last edited by
          #4

          Thank you and Shahriar for the answers. There is nothing special with the source code and it is even located in the same directory as the jQuery. I think it is just related to the way Chrome functions, since it works as expected in the incognito mode. Here it is a fragment (relevant, I hope): //... </style> <script type="text/javascript" src="jquery-1.5.min.js"></script> <script type="text/javascript"> var x = 10; $(window).load( // error here, $ unknown function() { console.info("jquery loaded"); testLoad(); }); //...

          Bogdan Rechi.

          C 1 Reply Last reply
          0
          • H Hans Ruck

            Thank you and Shahriar for the answers. There is nothing special with the source code and it is even located in the same directory as the jQuery. I think it is just related to the way Chrome functions, since it works as expected in the incognito mode. Here it is a fragment (relevant, I hope): //... </style> <script type="text/javascript" src="jquery-1.5.min.js"></script> <script type="text/javascript"> var x = 10; $(window).load( // error here, $ unknown function() { console.info("jquery loaded"); testLoad(); }); //...

            Bogdan Rechi.

            C Offline
            C Offline
            cjoki
            wrote on last edited by
            #5

            I ran this code without error in Chrome v9.0.597.98 beta without issue under the normal mode. Under firefox and IE it complained about console not not being defined.

            <html>
            <head>
            <script type="text/javascript" src="jquery-1.5.min.js"></script>
            <script type="text/javascript">

            var x = 10;
            function testLoad()
            {
            alert("hi");
            }

            $(window).load( // error here, $ unknown
            function()
            {
            console.info("jquery loaded");
            testLoad();
            });
            </script>
            </head>
            <body>
            <p>Testing jQuery</p>
            </body>
            </html>

            Chris J www.redash.org

            1 Reply Last reply
            0
            • H Hans Ruck

              Hello all, I am using the Chrome browser to run a simple html test page containing jQuery code. If I load it from the disk path, it works as expected. If, instead, I use the IIS, then it gives the $ is not defined error. Funny enough, using the incognito mode makes it work :wtf: Any idea about what could be wrong here?

              Bogdan Rechi.

              S Offline
              S Offline
              Sunasara Imdadhusen
              wrote on last edited by
              #6

              You should provide HTML code and also mention Directory structure where are you store .js file, this may helpful to diagnose the problem.:thumbsup:

              sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464

              1 Reply Last reply
              0
              • H Hans Ruck

                Hello all, I am using the Chrome browser to run a simple html test page containing jQuery code. If I load it from the disk path, it works as expected. If, instead, I use the IIS, then it gives the $ is not defined error. Funny enough, using the incognito mode makes it work :wtf: Any idea about what could be wrong here?

                Bogdan Rechi.

                M Offline
                M Offline
                Monjurul Habib
                wrote on last edited by
                #7

                </pre>
                I hope the above information will be helpful. If you have more concerns, please let me know.</x-turndown>

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups