Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Javascript is not running

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #151739

    I am in the middle of development and everything related to javascript all of the sudden stopped working.
    There are a couple ‘no method’ errors in the console, but I can’t seem to find the root of the problem.

    My site: http://radiantchurch.info/wordpress/about/

    Thanks for all your help!

    #151741
    Alen
    Participant

    You are calling fitVids.js and flexslider.js objects but they are not loaded.

    #151747

    Any idea on why they are not loaded? They are called in my header and show under the sources tab in chrome.

    #151748
    Alen
    Participant

    You are using wrong jQuery version.

    https://github.com/davatron5000/FitVids.js/blob/master/component.json

    Look at the dependencies section

    #151752

    Hmmm didn’t seem to work. I think the problem is broader than that, because nothing related to javascript is working on the site.

    Any more ideas?

    #151753
    __
    Participant

    I think the problem is broader than that, because nothing related to javascript is working …

    When javascript breaks, it stops working.

    The two issues Alen mentioned are still present on the page you linked to. Have you tried correcting them?

    #151755

    Yes, I have tried but can’t seem to find the issue.

    #151756
    Alen
    Participant

    Look at the order in which you are loading the scripts. You are trying to reference something that hasn’t yet been defined.

    // snipped code
    <script src=jquery-1.7.min.js
    <script src=RadiantChurch.js
    <script src=jquery.flexslider-min.js
    <script src=blur.js
    <script src=jquery.fitvid.js
    <script src=jquery.transit.min.js
    

    RadiantChurch.js should be loaded last.

    #151759

    No dice. Hmmmmm…

    #151765
    Alen
    Participant

    You’re missing a ; on line 52 RadiantChurch.js

    #151766

    Still failing… I am beyond confused.

    Thanks for all your help so far!

    #151841
    Alen
    Participant

    No problem. Looking at how many scripts you’re loading… Try solving the issue by disabling scripts one by one and see if that helps. Also, you don’t need to call document ready so many times. You can remap jQuery to bang, $ sign.

    (function($){
      $(document).ready(function (){
         /* window size code */
          $(element).stuff...
         /* expand */
          $(element).stuff...
         ...
      }
    });
    
Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.