WordPress.org

Ready to get started?Download WordPress

Forums

Google Inline maps and ShadowBox JS (2 posts)

  1. Ojster
    Member
    Posted 5 years ago #

    Hello,

    I have a problem with incompatible scripts:

    Google Inline maps and
    ShadowBox JS

    And I figured out where is the problem. Both plugins namely worked before I upgraded the ShadowBox to the latest version. But the problem does not lie with the version, only in different position of the ShadowBox JS code in the footer.

    Before upgrade it must have been place before the Google Inline code, but now it is displayed after it. If I move it before the Google code, then the maps will be displayed. But I do not know how to do it the way, that pages would be generated with this order. I only did it by hand and automatically the order is now always wrong even if I tried disabling and enabling plugins in a different order...

    the following code it the one causing problems:

    <!-- Begin Shadowbox JS -->
    <script type="text/javascript">
    	var shadowbox_conf = {
    		animate: true,
    		animateFade: true,
    		animSequence: "wh",
    		modal: false,
    		overlayColor: "#222",
    		overlayOpacity: 0.8,
    		flashBgColor: "#000000",
    		autoplayMovies: true,
    		showMovieControls: true,
    		slideshowDelay: 0,
    		resizeDuration: 0.55,
    		fadeDuration: 0.35,
    		displayNav: true,
    		continuous: false,
    		displayCounter: true,
    		counterType: "default",
    		counterLimit: 10,
    		viewportPadding: 20,
    		handleOversize: "resize",
    		handleUnsupported: "link",
    		initialHeight: 160,
    		initialWidth: 320,
    		enableKeys: true,
    		flvPlayer: "http://www.udobnoposvetu.si/wp-content/plugins/shadowbox-js/flvplayer.swf"
    	};
    	window.onload = (function(){
    		Shadowbox.init(shadowbox_conf);
    	});
    </script>
    <!-- End Shadowbox JS -->

    And just moving it in front of the Google Inline code make the maps display again...

    Any ideas how to change the order of these added plugin codes or how to correct the problematic code?

    thanks!
    Peter

  2. Big Mac
    Member
    Posted 5 years ago #

    Hi Ojster - I deduced the same as you, by trial and error, but I have also find a solution!

    I found this at http://sivel.net: "The Shadowbox JS WordPress Plugin has been updated to version 2.0.4.0. More big changes in this version. Now using domready events for all javascript libraries other than 'None' for initialization of Shadowbox.js before the site is completely loaded...........".

    So I went into the Shadowbox settings page and changed "Javascript Library" from NONE to JSQUERY. All that does is change the "window.onload" to "jQuery(document).ready(function" - so it is now fixed! My Google map works again (http://www.craftyjo.org.uk/location-map/).

Topic Closed

This topic has been closed to new replies.

About this Topic