0

I have finished an assignment for a bed and breakfast website. I completed everything offline, and all was working well; but when I went live the none of the interaction followed. I have an FAQ page with drop down and a fancybox for viewing the rooms.

I tried rearranging my links and scripts, i moved all my JS to separate files and called them all individually. I have checked everything I can think of, but still no luck. How/why would it all work fine offline, but fail when live?

Have been following the website since I began studying. Hopefully the community can help!

Puzzled as to what the issue might be. all links and scripts are accounted for in the appropiate folders.

You can view the website here

I hope I have provided enough information. Let me know if I should include something else.

Cheers, Gav.

JavaScript

$(document).ready(function() {
$(".answer").hide();
$(".question").click(function()
{
$(this).next(".answer").slideToggle(500);
});
});

HTML

<head>
    <meta charset="utf-8"/>
    <meta name="description" content="Gimme Moore BnB, luxury, affordable accomodation located in Galway. Explore Irelands beautiful West Coast in style and comfort."/>

    <link rel="icon" type="image/ico" href="imgs/favicon.ico" />
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/styles.css" />

    <script type="text/javascript" src="javascript/jquery-3.0.0.min.js" ></script>
    <link rel="stylesheet" href="javascript/fancyBox/source/jquery.fancybox.css" media="screen" />

    <script type="text/javascript" src="javascript/fancyBox/source/jquery.fancybox.pack.js"></script>
    <script type="text/javascript" src="javascript/faq.js"></script>
    <script type="text/javascript" src="javascript/fancyJava.js"></script>

    <title>FAQ</title>
</head>
6
  • 1
    see network tab.404 not found error.is there a javascript folder?it seems folder exist but files doesn't Commented Jul 9, 2016 at 14:05
  • Are there any errors in the console? Commented Jul 9, 2016 at 14:05
  • just check your console.. there are a lot of files not loaded (404 error). They are most of your JS libraries Commented Jul 9, 2016 at 14:06
  • 1
    I was tempted to down vote this as no attempt to show steps to reproduce - eg click this button then that one. And no attempt to F12 it ? Should be a first step before posting. However credit to you as the site is well laid out and visually not bad, so did not. Make the above your first steps next time and you will not need help from anyone. Commented Jul 9, 2016 at 14:08
  • Other possibility: Filenames and folder names are case sensitive. Make sure they are same as it appears in your script (all lowercase). While working on windows, this is always ignored. Commented Jul 9, 2016 at 14:10

1 Answer 1

4

Check your console via Inspect Element,

enter image description here

The file location cannot be found :), you need to make sure the path is reachable by the server.

Sign up to request clarification or add additional context in comments.

2 Comments

also a nice follow up from @Ren in the thread above, check for the folder and filename, its behave differently in windows and unix based server. :)
Thanks. Sorted now :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.