6 steps to take if your jQuery is not working

1. The file is not there or does not exist

People tend to become upset and/or frustrated (Including me) when something simple doesn’t work, such as jQuery not working. Before you do anything, navigate to your jQuery file and check that it is exactly where it should be.

Also make sure that you have the correct html file open – I have actually tried to load files using the incorrect html, so the path would have been correct if I had the correct html file open. Don’t ever be too proud to check the absolute basics.

2. Incorrect File Path

This is a common problem and it is the first thing I check when I’m having a javascript problem (I actually do step 1 and 2 with my style.css as well). After checking that the file path is correct, I double check by viewing the page source using Firefox, I then click on the .js link. If it opens up the jQuery file (Double check it is opening the correct file) then the destination is correct. If it does not, or it opens a page-not-found, then I know I have a problem with my file path.

3. Script load order

Help! jQuery not working, however it is loading perfectly!!!

Make sure that it is the first script loaded on your page. This is very easy to overlook. The problem exists because browsers understand javascript and not stand alone jQuery snippets. jQuery turns our code into normal javascript code, so that the browsers can interpret what we are saying. Javascript libraries are shortcuts.
If you were to load a library plugin (extra script file) before the library itself has been loaded, the plugin would be seen as bunch of mumbo-jumbo by the browser. This snippet of code means absolute nothing before the library has been loaded.

4. Plugin not working

Plugins malfunction sometimes, for whatever reason; And people sometimes tend to think that jQuery is not working, which isn’t always the case. When it gets this far I think to myself, “Lets get out the big guns”.
Note: Step 1 and 2 can also be applied to CSS problems.
Even though I have tried step 1, step 2 and step 3, I do ANOTHER test to make 100% sure that it is loading properly. 99.999% of the time this is the final test.
Firstly, I make sure there are absolutely NO plugins, other libraries or anything javascript related on my page, except for the jQuery library and a little script I write beneath it.

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
<script type="text/javascript">
	$("div").css("border", "3px solid red");

This adds a 3px red border to every single div on the page.

If this works, which it really should, the library is loading correctly. You then know that there is something wrong with the plugin(s) and that it is time for more troubleshooting. If you have more than one plugin, try switching the plugin order (This has worked for me on a few occasions), if it is still unsuccessful then remove each plugin and test until something works. Once you find the problem plugin, download it’s latest available version and see if it works.

If the 3px red border does not show up, then it’s time to jump to the next step.

5. Javascript library issues

Do not use multiple javascript libraries simultaneously! There are a few reasons to avoid this even besides the conflicts that could occur. More .js libraries means more html requests and more things to load. It doesn’t matter what .js library you use, use which ever you prefer more but stick with it throughout your project. There are thousands of jQuery plugins, I would say that 99% of the time there is no need for multiple libraries anyway.

6. Javascript disabled/not supported by browser

Make sure you are using a modern browser, and not IE 5.5 or something old and outdated.
It is possible to turn off the javascript support within a browser, and I have had this problem before (I actually turned off javascript support and forgot to turn it back on).
jQuery not working by this point? Try viewing the page with a different modern browser and see if there is any difference or make sure that javascript is enabled within the browser. This is a last resort.


  • Don’t load two different javascript library versions, only one is ever needed.
  • I have started loading jquery through Google at all times:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js?ver=1.4.2'></script>

The only downside to doing this that I can think of is if you are working offline (Obviously it won’t load) or if Google goes down for whatever reason.

  • Step 1, 2 and 3 can be applied to CSS files too. The Step 3 load order could refer to the IE specific stylesheets loading before the main one.
  • jQuery not working? Then follow the 6 steps again πŸ™‚
  • Feel free to comment and ask for help if any is needed.

Any questions or comments?

  1. John Seitz says:

    Hi Jamy,

    First of all, I love the design of this site – simple and elegant.

    Secon, You mentioned “Don’t load two different javascript library versions, only one is ever needed”. I don’t write Javascript, so I often find “effects” that I like and download the source files from the author’s site. So you’re saying that if the source file is a little older and calls for jquery1.3.2 for example it’s OK to use jquery 1.4.2 as a substitute?

    Thank you

    1. Jamy Golden says:

      Hi John, and thanks for the compliment πŸ™‚

      Yes, that is exactly what I am saying. I’ve noticed that sometimes people load jQuery 1.3.2 (for example) and 1.4.2 on the same webpage, which is unnecessary, adds to the html requests and can cause conflicts.

      Only one version of a library is necessary.

    2. Dimus says:

      Agreed on loading a single version, EXCEPT, newer versions of JQuery are not always backward compatible across the board. I have run into many issues in the past when upgrading to a new version.

      The choices: 1) reference a different JQuery library where needed. Or 2) Rewrite your JQuery code to match the new version.

  2. Hey dude, nice blog, btw there’s a typo:

    “5. Javascript libarary issues”

    1. Jamy Golden says:

      Hey, I’m glad you like it. And thanks for letting me know, fixed.

  3. Marcel says:

    Thanks for this tutorial. You helped me so much! Now my jquery is loading again…. yeah! πŸ™‚

    1. Jamy Golden says:

      Great! Glad it helped.

  4. atul singh says:

    Hey, I have tried all that u told…but still animation, fadeTo not working. I am using vs2005 and ie8 and just for a moment it looks that animate is going to perform but it does not.


    slideToggle is working properly….

    1. Jamy Golden says:

      Hi, yes that’s quite simple to achieve:
      If you look for this line of code:

      var catTopPosition = jQuery('#cat').offset().top;
      And change it to:
      var catTopPosition = jQuery('#cat').offset().top - 130;
      It should do what you're trying to achieve.

  5. sneha desai says:

    thanks for this blog. this help me a lot. Initially my jquery was not running because i did not downloaded & had put jquery-1.7.2.min.js file. after so long time i realised that i have not placed this file in my directory & therefore my program was not running.

    1. Jamy Golden says:

      I’m glad it helped πŸ™‚

  6. Kayla says:

    Very new to this… but this image zoom jquery im working on is fine in Live View but when go to look at it in any browser nothing shows up. When I pull it up in IE and click on the question mark icon it says it cannot locate the file. Why is that? I haven’t moved it and yet the live preview sees it.

    1. Jamy Golden says:

      You should try and move away from Dreamweaver when you can :p
      They may be setting up urls beginning with a ‘/’. That would work if you had a vhost set up but wouldn’t work otherwise. I’m taking a shot in the dark since I’m not actually seeing your website. Bottom line is your files aren’t being linked to.

  7. Lee says:

    Very helpful stuff. Your blog helped me solve a problem I had for two days. Never have multiple versions of jquery files in one project – point mastered. Thanks a lot.

  8. Saad says:

    Please check this website, everything is okay, but the website doesnt load like it should. Like it stops. Can u sort out the error by the source code? Or i can send u the files. Please help!

    1. Jamy Golden says:

      Hey, the CSS-Tricks forums is a great place to find people to help with your every day problems. Ask the question there and I’ll probably end up helping =)

  9. ysai java says:

    hi please help me with this website. http://e-turumi.jp/demo/tsurumi/index.html… the slidebanner is not working in ie7.. i need it to work in that version of browser because a large percentage of japanese people is still using ie7.. thanks so much!

    1. Jamy Golden says:

      Hi Ysai, I’d say it’s probably because you don’t have a ‘left: 0’ property added to .headerimg

      IE7 requires a left/right and top/bottom value.

  10. Anamika Haridas says:


    I have a doubt , Instead of calling both js file in the main jsp file (as shown below) , can i cal the first js i.e, jquery js from any other page or
    is that we have to cal the jquery js always in the loading jsp file?

    1. Jamy Golden says:

      It should be fine whether it’s an external or internal file just as long as its actually correctly linked πŸ™‚

  11. meow says:

    I’ve found reopening the html file to work sometimes, if you are just refreshing the page.

  12. erl says:

    After hous of toubleshooting, I used your tip
    $(“div”).css(“border”, “3px solid red”);
    and the problem was fixed in minutes


    1. Jamy Golden says:

      Great! I’m glad it helped.

  13. jery says:

    Below is my code. I work with Aptana HTML editor. I have jquery v1.8.2 js file saved locally in at least 3 places in my computer, including jre/lib folder and desktop, where this html file is saved. But when I run the code, only the text ‘Hello’ and ‘Hi’ appear. When I click on ‘Hello’ nothing happens. But when I tried this same code on an online editor called Tryit Editor v 1.5, it worked correctly! Why?


    1. Jamy Golden says:

      Is that the html exactly? The JS should be wrapped in a script tag. Also, where is the “clas” id? Try something like this:

      <div id="clas">Hello</div>

      Forgive me if I’m stating the obvious, but I just need to make sure :p

  14. Kiran says:

    In my webpage I am doing two things

    1. Image slide show

    2.Image popup

    for that I had included 6 javascript files, but it conflicts. It works fine individualy. How can I avoid the javascript conflict?

    I had included the js file like as below

    —————-for popup————-

    —————for slideshow————-

  15. tndonny says:

    your are gr8

  16. Sakthivel says:

    HI Jamy,
    1.I’m using multiple jQuery applications like sliders, image zooming , show and hiding div ..so on.. so i have multiple jQuery versions. In a same page i included 1.4.2, 1.0.2, 1.2.6 and 1.7.1. So as you said, if i just call 1.7.1 would everything run well ?? I guess its not running in ma site !?

    1. Jamy Golden says:

      This could be happening because one of the plugins doesn’t support the newer versions of jQuery. This is a problem with the plugin itself. Perhaps you should contact the developer and ask them to update the plugin.

  17. Nitz says:

    My jquery script dont work when page loads for the first time but when i refresh the page its working. Please help.

    1. Jamy Golden says:

      You should try and validate your HTML, this sounds like it could be caused to do some HTML error. http://validator.w3.org/

  18. Roberto says:

    I have problems with references to the modules directory. The template uses the plusslider.css using the following reference:
    But the web server, apache, in the httpd.conf file contains an alias (modules) to its own directory. For this reason, the css is not loaded because it is searched in the modules directory of apache.
    How can you do to get around this?

    1. Jamy Golden says:

      What about relative path linking?

  19. Hi, Jami!
    I have the same problems with JSs. As Kiran said, it works fine individualy, but on 1 page it doesn`t work.
    I use

    Plz help! And thnx

    1. Jamy Golden says:

      There is a script conflict. You would need start with 1 script that works, and slowly keep adding your other scripts until you get that same conflict. Once you figure out which script is causing the conflict, google for “jquery conflict xxscript”.

  20. Achraf says:

    thx so much for the tips… They was very useful πŸ™‚

    1. Jamy Golden says:

      I’m glad you found it helpful!

  21. hk says:

    hi Jamy,
    I have a problam with my ajax jquery request it works perfectly in FF,opera but it’s not responding in ie….
    Please help!!

    1. Jamy Golden says:

      Are you using jQuery? jQuery usually takes care of most browser inconsistencies. If you are using jQuery, could you recreate an example for me to have a look at?

  22. S.Velmurugan says:

    i have done after downloading the jquery into local system as fallow,, i place all the file correctly , Even-though i got an error. Please help if i made a mistake, I am a beginner only. Pls help me soon .


    Second Jquery
    This is Paragraph

    jq_My.js file contains :-

    1. Jamy Golden says:

      Can you create an example of the problem on CodePen or JSFiddle?

    2. S.Velmurugan says:

      I have created codepen account and you can access it my location as shown below
      in that location testonly file is there.
      in that i have added my HTML and Js file and i didn’t mention jquery file i have downloaded jquery.com site place in the same location where i kept html and js file.

    3. Velmurugan says:

      Can any one help me now?

    4. Jamy Golden says:

      You weren’t linking to jQuery correctly. I’ve linked to a proper version here and the script runs: http://codepen.io/anon/pen/bnicC

  23. Colby says:

    Your a GOD. Thank you!

  24. Gershon says:

    Dear Jamy

    I used all the steps you recommended in this great piece and even deployed the color-the-divs-red test code, and it still was not working. It was driving me barmy.
    Turns out that, after consulting an online for-hire guru, the problem was with my loading the google jquery source. My antivirus software blocks loading from that site. The guru put in code that refers to the latest release on the jQuery.com site, as follows:

    This worked–and only it worked. My guess is that the jQuery site has a current security certificate with Norton (Norton 360) and the googleapis site doesn’t. There would be a long load in things like IE or Chrome, ending in the non-working page. I suspect that was while they were chasing certificates.

    Just thought I’d bring this up, in case anyone out there is about to pack in jquery, which imho is the wonderfullest thing on the web.



  25. Dave says:

    Hi Jamy,
    Your website helped me a lot! I am forced to use multiple plugins in one HTML document. However some plugins are from different versions of Jquery. It’s as you mentioned on your site – it makes the code above it break. Do you have any idea how I can get around this issue?
    Some advised me to use the NoConflict code, others the migrate plugin. Which one? And how do I deploy it?


  26. Guru says:

    I am building an asp.net application with c#. I use a master file within which I put all the references to the jquery folders (both css and js). I create an aspx page inside a folder and refer to the master file (the master file is in the root of the application path), the styles are not properly rendered; moreover, the browsers throws an error, saying “$ undefined”. I understand this is related to path reference but i dont know how to overcome this.

    \ Application Root
    |-\js\(jquery files)
    |-\css\(css files)
    |- App.master (this refers to js and css files as src=”js/jquery-1.9.1.js” and src=”jquery-ui-1.10.2.js”
    |-blahblah.aspx (refers to app.master) – jqueryui works fine
    |blahblah2.aspx (same) – jqueryui works fine
    |-new.aspx (this refers to the app.master in the root; this files creates the problem.)

    The problem is the master file always refers to the jquery files relative to the root folder. when aspx files from within a folder are called this becomes a problem.
    This seems to be more of a path reference problem than jquery issue.
    Please suggest how to overcome this

    1. Jamy Golden says:

      How about calling the files from the route of the site:
      src="/js/jquery-1.9.1.js" and src="/js/jquery-ui-1.10.2.js"

  27. I see many examples of specific effects or “widgets” on sites. Each looks nice and provides something useful. Each time I try to integrate them into a “real” working system with rich features, I find that various combinations don’t work and a lot of time is spent getting the order of statements right, etc.

    For instance I can test various portions of my pages without problems. However the full set consists of a page, activity.jsp. This page uses xslt transforms to create the data fields on a form from an xml file it receives from a dispatcher servlet. Both the name of the xslt and xml file are received. The page is built, then on the client, styles are applied and then after the page load is completed, various jQuery plugins should be activated. An example is that one of the plugins for a calendar is written by the xslt.
    I have checked that all paths are correct, etc. but the plugin doesn’t work when created in this fashion.

    I use the web console to try to determine why this is occurring. All ids are found, etc. If I put alert boxes for various actions, they come up, etc. Yet the plugin doesn’t work.

    Is there a problem with using jQuery along with xslt, etc.?

    1. Jamy Golden says:

      I haven’t worked with javascript and xslt at the same time before so I’m not sure if there could be a problem. Do you have a test page/staging environment I can have a quick look at?

  28. Dan says:

    Thank you for the article!

    I spent 10 minutes going over and over my code, looked at this article and realized I hadn’t put the jQuery Library above the link to my JavaScript file.

    Thanks again!

  29. souad says:

    Thank you for this post πŸ™‚ it helps . but Is it a problem if we use many scripts Jquery in one page?

    1. Jamy Golden says:

      Yeah it is. Try and limit it to 1 jQuery script and version per page.

  30. John Wooten, PhD says:

    I find it helpful to add
    border: 2px solid red;
    To divs I’m having problems with. Change the color for different ones. This shows me why they won’t line up, etc.

    1. Jamy Golden says:

      Adding the css styles with jQuery is just a test to help find what the actual loading problem is. So if it does break the alignment, it doesn’t really matter since you can just remove that right away.

  31. Lalit Vaghela says:

    jQuery not working perfectly in IE9, when i refresh that page it works fine.. why this happen ?? plzz give me solution.

    1. Jamy Golden says:

      Try validating the page. Sounds to me like that could be a problem.

  32. Jakob says:

    I could kiss u.

    3. Script load order – it was for me.

    Thanks a bunch

  33. pk says:

    another reason mine was not working was… i was using a custom editor that was not pasting all the jquery information.

    pasted using notepad. it worked then.

  34. tara_185 says:

    Thank u!
    I had 4 validation scripts :/
    Deleted them and it worked great

  35. Maja says:

    Hi there,
    First of all great site and very helpful tips. Unfortunately they didn’t help me, but I think it’s because I am missing something quite simple. I see in .js files instructions that I need to work the plugin interface into the html mark up. Problem is I am not sure how to do this as I used my own design with another lightbox and all my files already have styles and ids. I know this is probably very basic so sorry if it’s a silly question.
    Any help will be greatly appreciated.
    Thank you,

    p.s. Unfinished site is on http://mayabeusdesign.com/ so you can see what exactly is happening.

    1. Jamy Golden says:

      Hi. My console is telling me that you have a problem in init.js on line 16. That’s what’s probably stopping the lightbox from loading. Hopefully that puts you onto the right track.

  36. Akshata says:

    I am making a site wherein as i click on a particular image the border and certain attributes of the image must change. I have displayed the images on the using a table as below:

    /. other code here…./

    and my jQuery code is as below:


    Where am I going wrong??

    1. Jamy Golden says:

      Can you create a jsfiddle of the problem?

  37. Or just make sure all the plugins are working properly, that was my issue. Decided to change some variables within a plugin and everything went to the roof. Reset it back and voilΓ‘…

    Also, some old plugins with the latest jquery versions just stop working. So is life. Be prepared and do not panic.

    Cheers Jamy

  38. John Locke says:

    It’s really easy to get bitten by jQuery problems. Most of the time, if a script I’ve written doesn’t work, it’s because I haven’t loaded jQuery before the script runs. Thanks for these great troubleshooting tips, Jamy.

  39. Donkfather says:


    I just had this problem. I use chrome on my android device and i had to deactivate the option that blocked pop-ups… and it work… i used some animate functions.

    Have a nice day

  40. Nir says:

    Dude I am so surprised that you are trying to reply all the questions. You’re great.

    1. Jamy Golden says:

      Haha thanks!

  41. AlsoTracy says:

    #2 using FF fixed my problem. (Paths are my nemesis.) Thanks so much!!

  42. Vijay says:

    Hi Jamy,

    i am using jquery slider plugin which is using jquery version 1.7.1min.js. which is working fine.
    but when i try to add the jquery enabled menu to the same webpage which is using jquery version jQuery v1.10.1, then, when the page loads, i am able to see the jquery menu but image slider which is also there on the same page is not working. it will just show loading.jpg, and the entire iimage slider never gets loading.

    kindly suggest any URL , if i want to add the jquery menu and slider on the same page written with same version of jquery.

    Awaiting your reply on this ASAP.

    1. Jamy Golden says:

      Hi. I think this is happening because some of the jQuery used is deprecated in version 1.10.1. If you don’t plan on re-writing the javascript I suggest sticking with version 1.7.1

  43. Gerson says:

    This loading problem can take an hour or two to realized, in particular when you have a working site, and suddenly doesn’t work because of a trivial issues.

  44. Matt Smith says:


    We ran into a situation where jQuery 1.2.x was the default for the site and I was loading 1.4.2 in an iframe. One of local guys said it would be OK, and it was for a short time. Then things blew up and items that were supposed to show didn’t. Nobody still knows what happened except that it had to do with jQuery not loading or being recognized on this one set of pages.

    Have any idea as to why jQuery in an iframe would blow up, even though there were no apparent conflicts, since the version I was using was in an iframe?

    I’m currently looking for a way to replace the jQuery code with straight JS, but it’s not easy, since a set of loops that looks at data in a spanto figure out if the contents of a div should be shown or not. When it works, it’s sweet…and when it doesn’t, I have people higher up on the food chain not happy.

  45. Dharmin says:

    Hi Thanks for all the information.

    For some reason I am not able to deploy jquery.min.js into the path it has to be(….core/library/js/jquery/1.3.2/jquery.min.js) in my webserver. Therefore i deployed the file under ….core/library/js/jquery/jquery.min.js.

    This thing created a mess and many jquery errors thrown.

    So question is does the path of jquery.min.js has to be PROPER ? Please suggest. Thanks

    1. Jamy Golden says:

      I’m guessing that the path you are referencing is incorrect. No, jQuery doesn’t have to have to have a specific file structure path. You could always reference jQuery via the google CDN. http://scriptsrc.net/

  46. k4creation says:

    heyy im new to jquery . im using jq version 2 . and i used the code

        $('#a a').css({"color":"#333"});

    its working in mozilla , chrome , safari and opera . but not working in IE10
    can you help me , i had tried all the 6 steps its okkay

  47. Paul McCourt says:


    Im fairly new to html and web design in general, my background is largely design. but recently made a personal website to show my portfolio and found out about jquery, so thought i might try and add a new nice effects to button etc.
    So i downloaded the very latest version of query and put it into a ‘scripts’ file in my root folder for my site.
    Bascially the effect I am after is a simple faze button rollover effect for my main page. So I constructed the html code for this (which to the best of my knowledge is correct?) and dreamweaver says the code is fine with no errors.

    Here it is:

    		$('a img').animate({
    		$('a img').hover(function(){
    		}, function(){

    Yet when I save and load up in a browser, no effects take place… its almost as though the code is ignored.

    Can anybody help please?

    1. Jamy Golden says:

      Do you have an example link with the problem I could have a look at?
      I just saw that your site is built up using framesets, that will create a big problem when trying to access certain things with the javascript. If you load up the script, and then have a frameset which includes the ‘a img’ html, the javascript won’t be able to access that and will seem as if the javascript is just being ignored.

      Using framesets is a really old way to develop websites and is considered pretty bad practice. I think you are using the framesets to be able to re-use code within your site without having to duplicate it on each page. I would suggest you use .php files and use the php include() function. If you need any help with that just send me a message via my contact form on the contact page.

  48. Naz says:

    I have to say “Thank You Very Much” to you for this. I was having trouble with my jQuery until I read this. Apparently I had the script load order wrong.

    1. Jamy Golden says:

      It’s my pleasure. Yeah it’s the small things that are tricky at first!

  49. Anurag Yadav says:

    3. Script load order …… YOU are a life saver THanks

  50. Danny says:

    Thankyou, I had the step 4 problem; as I were inserting my jQuery Mobile Plugin before the jQuery Min, and therefore the jQuery Min file wasn’t uploading untill i swapped it to be the first one. So thankyou πŸ™‚

  51. Joe says:

    Good advice. Also, beware of using jquery-latest cdn. I changed from 1.7.2 to latest and found this week that the script had broken. Changing back fixed it.

  52. Your liberal use of the phrase “jquery not working” seems to have done the trick on the search engines πŸ˜‰

    1. Jamy Golden says:

      Haha yeah, I was actually doing a test when I wrote this article.

  53. Irshad says:

    Thanks Jamy Golden,
    I was using multiple Plugins. I commented out the older version and it worked fine. Have a good day.

  54. Akshay Kokate says:

    Hi Jamy,

    First of all it’s a great blog and your tutorial helped me a lot. In fact I am checking these 6 things whenever I am working with jQuery. Thanks for that.

    Actually I am a noob in javascript, I have one problem, I have checked all the steps you told in your tutorial but still no luck.

    I am loading all javascript libraries first and then I have written the javascript for the page. Now I am converting all the javascript code into a file called scripts.js and I am calling that file but it’s not working.

    Please Help. Thanks.

    1. Jamy Golden says:

      Hi Akshay, could you please send me a link to a page that has this problem so I can check it out?

  55. Jayden says:

    Legendary post. Saved me a few times, being a part-time jquery user.

  56. Hi Jamy,
    First i want appreciate your free effort here in your Great Blog.
    second i am not beginner but recently i faced an amazing problem that i couldn’t find any solutions for it really!
    this simple code:
    alert(‘hello world’);
    this peace of code for example is working randomly!
    the first time when i run the page it is correct and i can see the message “hello world”. but the if i refresh the page it wont work. and if i repeat refreshing some times it will work in random time.
    how can it possible?

    1. Jamy Golden says:

      Hmm that sounds quite strange. Do you have an example of this problem I could look at?

  57. Harpreet says:

    Thanks for your 6 step. i was stuck my jquery code is not working.
    your suggestions is much help full for me.

  58. Sibren says:

    Hi Jamy,
    I’ve just started learning jQuery, but when I tried to use it on a server, I found out it isn’t working. I’ve downloaded the library and confirmed that it’s hooked up to the page (steps 1-3) and when I paste the bit of code from step 4, my divs indeed get a red border. However, I’m not sure how to continue from there. You write that there’s probaby something wrong with ‘plugins’, but (being a newbie) I’m not sure what you mean with plugins. Is a plugin a script loaded with ? Because I’ve only got one of those, and it’s the jQuery one…
    Hoping to hear from you, Sibren

    1. Jamy Golden says:

      Hi Sibren. By “plugin” I mean “external script”. I will clarify that in the article.
      If the borders are going red, it definitely means jQuery is loading up correctly. What are you expecting to see that isn’t working? Do you mean it works for you locally, but not on the server?

    2. Sibren says:

      Hi Jamy, this was some time ago so I’m not a hundred percent sure how I had solved the issue back then, but if I recall correctly, it was a problem with the permissions (read/write/remove) set for the file I was trying to use jQuery in. For some reason, the server I was working on is very delicate when it comes to file permissions and whether or not something will work. But the issue was solved by turning all the permissions up to maximum actions allowed.
      ~ Sibren

  59. Stefan says:

    Nice post there, you highlight most of the usual mistakes but there is one mistake that took me +3hours to figure out the problem.It was that i had first linked my jQuery script file and after that i had linked the jQuery CDN.It was like this:

    // Here i have linked my jQuery file

    // And Here i had linked the jQuery CDN

    So my code didn’t work.Then i put the link to my jQuery file after the link to the CDN and everything worked!!!

  60. mobile games says:

    Wow that was odd. I just wrote an very long comment but after I
    clicked submit my comment didn’t show up.

    Grrrr… well I’m not writing all that over again. Anyways, just wanted to
    say fantastic blog!

  61. Jamy Golden says:

    Do you have a demo link where I could see the problem?

  62. Darshan says:

    This works.
    <script src=”//code.jquery.com/jquery-1.10.2.js”></script>

    This does’nt work.
    <script src=”../Scripts/jquery-1.10.2.js” type=”text/javascript”></script>

    Any idea where is the issue?

    1. Jamy Golden says:

      Yes, it looks like the path to your second example doesn’t exist. If you open your page source in your browser, open the src in your browser and you should see your second example will not open an existing file.

  63. Rushi says:

    HI Jamy,

    Nice to see your site.

    I am facing an issue while including a jquery file reference in my aspx page(.Net web development)
    I am using “jquery.multiple.select.js” for implementing a functionality having dropdown with multiselect using checkbox.I have kept my js file under assets folder but still does not work.

    But when i put the whole js file in my aspx page. it works as expected..

    Please help

    1. Jamy Golden says:

      It sounds like you aren’t linking to the external script file correctly. Make sure the url is 100% correct.

  64. James says:

    Hi Jamy,

    I am attempting to learn qQuery and this is my first attempt. of course, it does not work!

    Can you see any reason why based on the following? All copied from page source.

    I have checked that the paths are correct too. The script is in the example.js file.


    $(document).ready(function() {
    alert(Just open will ya!’);


    Thanks a million if you are able to help.

    Sorry, but I cannot send a link as this is local.


    1. Jamy Golden says:

      The text within `alert()` isn’t being quoted correctly. You’ve left out the first quote. It should be:

      $(document).ready(function() {
          alert("Just open will ya!");

      What text editor are you using? most text editors should highlight that as a syntax error.

  65. Hazel says:

    Awesome blog you have here but I was wondering if you
    knew of any message boards that cover the same topics discussed here?
    I’d really like to be a part of online community where I can get comments from other knowledgeable people that share the same interest.
    If you have any suggestions, please let me know. Bless you!

    1. Jamy Golden says:

      Hi. Have a look at the CSS Tricks forums. They are very helpful.

  66. anas says:

    Thats amazing after 4 years this topic stills active !! thanks man you are the best πŸ™‚

  67. Bumb says:

    Could You help me? I managed to find the thing I need and everything is working ok on JSFiddle, but not on my page.

    What I add to my website:

    $(‘tr:not(.none)’).click(function () {
    $(this).nextUntil(‘tr:not(.none)’).toggle(); });

    And ofc all html and css stuff, but it doesn’t work on webiste, but works perfectly on JSFiddle.

    Thanks in advance.

    1. Bumb says:

      Oh by the way: tr wont appear on the click, on my page.

  68. Rebecca says:

    Lifesaver – thank you!

  69. Sayali says:

    Jquery runs successfully on localhost but when same folder uploads on server, it does not work. πŸ™

    What can be the issue?

  70. Hesusko says:

    Hey man, I’m working on this project and the problem is there are times when the functions work and sometimes doesn’t. What could be a possible cause for this? I’m working with WordPress Plugin by the way.

    1. Jamy Golden says:

      Hey. It could be a lot of things. Try and explain the problem at the CSS Tricks forums and someone will quickly help.

  71. Mauricio says:

    Excellent… I was wondering for hours whats going on…. and then … when our suggestion of code to show a red border I was able to determine what was causing my script not to work… many thanks for share your knowledge, bye.

  72. Tayyaba says:

    This article was very helpful. My problem resolves..
    Thank You πŸ™‚

  73. TZ says:

    I replaced my jQuery library with yours below.

    It works now. Thank you very much!

  74. Nathan says:

    The 3rd step just brought away the confusion!

  75. LOLz. Thanks dude i got to number 4 and bang my problem was solved. i actually placed the bootstrap js file before the jQuery file leading to errors. you are a life saver. thanks for this post from 2010, i guest am commenting from the future.

  76. Nate says:


  77. MichaΕ‚ says:

    Thanks a lot for this guide, it help me a lot every time I write jQuery (I’m not a pro, and the library usually doesn’t work at first ;p).

This site uses Akismet to reduce spam. Learn how your comment data is processed.