WordPress.org

Ready to get started?Download WordPress

Forums

Javascript banner conflict: Jquery.min.js (1 post)

  1. Calvin Nix
    Member
    Posted 3 months ago #

    Hi, and thanks for at least giving this a read. My site has a problem when I use the jquery.min.js file. The "Featured Content" in the banner with the polaroids fails to cycle the banner every six seconds. This is due to me adding the following code in the header:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script type="text/javascript" src="http://beaufortmusicfestival.com/wp-content/themes/mystique/js/showHide-data.js"></script>

    This was added so that I could use expand and collapse data functionality as seen on the front page links called: "How to Volunteer" and "FAQs page". The expand and collapse is working fine, but it has caused the featured content rotator to stop cycling. When you refresh the page it loads a new banner, but will not do it without a reload. If I remove the two script lines above it starts working again, and the data show links stop working. I can't get both working together.

    I have a javascript file called showHide-data.js in the path seen above that contains the code for my data dropdowns to help make the header more readable. I have tried adding wp_enqueue_script('jquery'); and working with various function versions of this and it still gives me the same results. No banner rotation.

    Clearly there is a conflict with the jquery calls/integration/timing that is causing this. I know wordpress has its own .js files located in several places, but I am yet to figure out how to make the javascript that is already incorporated into the site work with what I am trying to use without error. Upgrading wordpress at this time is not an option. Any help or insight on this would be appreciated. thanks.

Reply

You must log in to post.

About this Topic