Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, I think it’s your theme that is adding

    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

    to the head section. FancyBox is not compatible with jQuery 2+

    Remove that line from your themes header.php

    Thread Starter leomb

    (@leomb)

    Brilliant! Yes, that was indeed the problem. I changed the jquery version number to 1.11.0 and now the script doesn’t freeze and it all works beautifully.
    Thank you RavanH. Excellent work!

    Ok, but then the jQuery library still gets loaded twice… There is no use for that second call.

    Thread Starter leomb

    (@leomb)

    Well, I have the nivo slider on the home page that needs it. If I take out that line, the nivo slider disappears. I guess it’s a question moving the nivo script link to a place after easy fancybox’s. I’ll check and see what I can do because you’re right about not needing to call jQuery twice.

    If you look at your page source (press Ctrl+u in most browsers) then you can see that the jQuery library that comes with WordPress has already been loaded before the one from Google is called. There should be no need to include that extra call.

    To make sure jQuery is included even if the Easy FancyBox plugin is deactivated, place the line:

    wp_enqueue_script("jquery");

    right before the wp_header() call in your themes header.php template.

    See https://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/ for example.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘close icon missing’ is closed to new replies.