Support » Plugin: gee Search Plus, improved WordPress search » Getting jQuery via Google CDN breaks the plugin

  • Resolved A. Albrecht

    (@alexander-albrecht)


    I’m using the HTML5-Boilerplate technique to load jQuery via Google CDN with fallback to local files. The following code is in my footer.php

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    	<script>window.jQuery || document.write('<script src="<?php bloginfo('template_directory') ?>/js/libs/jquery-1.10.2.min.js"><\/script>')</script>

    But doing this, breaks the plugin. The browser will not load the full site. It stops and hangs right there. If I remove the CDN loading and use the fallback, the plugin works fine.

    Is this an issue you are able to reproduce?

    Kind regards
    Alex

    http://wordpress.org/plugins/gsearch-plus/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter A. Albrecht

    (@alexander-albrecht)

    I’ve seen that this plugin calls jQuery and the migrate.js at the head. This causes problems as my theme loads jQuery at the bottom. Even preventing that calls from gSearch plus does not help me. Highlighting breaks. I’ve switched that off.

    Plugin Author Luis Godinho

    (@luistinygod)

    I’ll have a look right away. Thanks for all the feedback, Alexander!

    Plugin Author Luis Godinho

    (@luistinygod)

    Indeed there are issues regarding the highlight feature and other plugins (like Jetpack). I’ve changed the way scripts are loaded on frontend, I’ve also included a limitation on where highlight feature can act (regarding the DOM) thus reducing possible scripts’ conflicts.
    Could you please test version 1.1.8 and let me know how it goes at your end?

    Thread Starter A. Albrecht

    (@alexander-albrecht)

    Much better now. Works without breaking the site. But you should consider to allow CSS styling for the highlighting. <span class=”gsp-highlight”> would do the trick.

    Plugin Author Luis Godinho

    (@luistinygod)

    Nice. If it works for you don’t forget to push “works” button.
    And thanks for the suggestion.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Getting jQuery via Google CDN breaks the plugin’ is closed to new replies.