0

page: www.eveo.org

My page doesn't load, but it does output to console from the file which is supposed to fade my site in.

http://eveo.org/js/init.js line 37-43

$body = $('body');

        $body.fadeIn(1000, function() {
                $('.about p').fadeIn(500, function() {
                    $('.about footer').fadeIn(500);
                });
        });

However, it seems to put a few console.logs that I have further down in the file. When I view the url http://eveo.org/js/init.js after navigating to it from eveo.org, and hitting back, my website loads. If I just go straight to eveo.org it doesn't load and execute the above javascript.

Really at a loss, never had a problem like this.

5
  • Is your init function ever getting called? If I run your excerpt from the console it works. Commented May 21, 2015 at 21:08
  • Can you fix these errors and see what happens? validator.w3.org/… Commented May 21, 2015 at 21:14
  • no, those are semantic errors, my page worked fine before i reconfigured my server. Commented May 21, 2015 at 21:18
  • 1
    No, they're HTML errors. Duplicate ID's aren't allowed. Commented May 21, 2015 at 21:18
  • yes and html errors are purely semantic in nature and won't block the loading of a javascript file. i fixed the permissions on all of it and it works fine now, however now it doesn't load when i refresh the page, but it loads when i load the page in a new tab. Commented May 21, 2015 at 21:22

1 Answer 1

1

You have display:none; on your body element.

style.css, line: 8

body {
    font-family: "proxima-nova", 'Proxima Nova', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin: 0;
    text-align: center;
    text-rendering: optimizeLegibility;
    display: none;
}

I think you knew that, but try changing your jQuery call to fire when the document is loaded.

jQuery(document).ready(function() {

    var $window = $(window),
    $body = $('body');

    $body.fadeIn(1000, function() {
            $('.about p').fadeIn(500, function() {
                $('.about footer').fadeIn(500);
            });
    });

    ... rest of code

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

4 Comments

well i got the site working, fixed permissions on my files, but now the page won't load when i refresh it or go to it in a new tab, only when i type it into my address bar, load it (blank site), then click the address bar again with the same url, and hit enter. super weird.
If you look at the page source, your site is loading fine. What's happening is that you're js is firing before the content is being loaded. Did you alter the jQuery code like I suggested? Also, if you remove the display: none; to the body, you'll see the page load fine every time.
ok i tried that and it's still the same thing, just a blank page. i had this exact code working just fine before, reconfigured my server to use nginx instead of apache and now it just blanks. i know the site is there when i remove display:none.
Hmm - At this point I would try commenting out all of the code in your init.js file except for the document.ready call and the code inside of it that shows the body. See if you can get the body to display that way. If that works, uncomment each function at a time until you find the piece that's causing the issue.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.