0

Hi I hope someone can help. I am trying to write a website for a local charity and it was going fine off-line. When uploaded though the accordion menu is fully open on page load and there is no slide up/down function any more.

My link for testing is http://www.imperialcharity.co.uk/new . I am new to jquery etc but would be happy to provide more details if required. The original menu script is by DesignChemical.

Hope you can help

After my comments Matthias_h came back with renaming jquery,cookie.js to cookie.js. I had tried renaming this prior but what I didn't think of was when I tried viewing I was probably looking at a cached version? When I refreshed the window this time it all works!!

Thank you so much Matthias_h for your so helpful help.

127dcs
  • 3
  • 2
  • Thanks Matthias_h for getting back so quickly, Sorry don't quite understand as I uploaded jquery.cookie.js with everything else. I have uploaded again but still doesn't work. Thanks also for the aside – 127dcs Dec 27 '14 at 04:27
  • Also found on stackoverflow re renaming jquery.cookie.js. Tried that but no joy – 127dcs Dec 27 '14 at 10:31
  • Just updated my answer with some suggestions. As minor aside for stackoverflow functionality - I don't get any notification if you comment on your post, only if you comment on my post/answer or if you would write `@` followed by my username in a comment elsewhere. For details: http://meta.stackexchange.com/questions/43019/how-do-comment-replies-work#answer-43020 – matthias_h Dec 27 '14 at 15:42

1 Answers1

0

When you check the web developer console, you'll notice the error

TypeError: $.cookie is not a function

This is most likely caused by the missing file

http://www.imperialcharity.co.uk/new/js/jquery.cookie.js

In case this error is fixed by uploading the missing file, it's possible that everything will work fine.

To add more detail - the initial server response header for this file is the status code 406 - Not acceptable (for detailed explanation you can check What is "406-Not Acceptable Response" in HTTP?), but as the server response is "An appropriate representation of the requested resource /new/js/jquery.cookie.js could not be found on this server." , uploading the file might already fix the problem.

Not relevant to the problem but while checking the net console I just noticed that there's also an image missing - http://www.imperialcharity.co.uk/new/css/loader.png

Update: The mentioned error 406 with the jquery.cookie.js is still there. I just checked the DesignChemical accordion plugin with the jquery.cookie.js that comes together with it and it looks fine. I would suggest to rename the file - e.g. to cookie.js instead of jquery.cookie.js and to change the include accordingly - but as I understand you already tried something like that.
To make it easier for anyone trying to help you to solve this issue, it would be good if you could update/add approaches already tried in your question as comments could get overlooked. Also it would be good to know what happened when you renamed the file - if not already done, open web developer tools and check the net panel. Just in case you're unsure about that, e.g. for Firefox it looks like this: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor , for Chrome like that: https://developer.chrome.com/devtools/docs/network. It would be good to know if in case of renaming the file the error is still the same.
Just to exclude following possibility, you can download the uploaded file, open it and check if it looks o.k. / the same like the file working for you locally. Maybe it happened that the file wasn't uploaded completely and is broken.
And as a last guess you can check if the file permissions for the jqery.cookie.js are the same as for the other js files. Though in case of different permissions the error would be different (e.g. 403 Authorization required instead of 406) one never knows how the server was configured. All the other js files in the folder are accessible, e.g. http://www.imperialcharity.co.uk/new/js/jquery.dcjqaccordion.2.7.min.js, only http://www.imperialcharity.co.uk/new/js/jquery.cookie.js behaves uncooperative.

Community
  • 1
  • 1
matthias_h
  • 11,356
  • 9
  • 22
  • 40