Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter PhilHolmesDesign

    (@philholmesdesign)

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    Hi Phil,

    Thanks for using NextGEN Gallery Optimizer!

    I’ve been looking through your source code, and the odd behavior you’re seeing from Fancybox’s loading icon appears to be caused by a secondary Fancybox stylesheet from the Google Maps Widget, which is loading on every page of your site.

    As you only appear to be using the Google Maps Widget on your “Contact Me” page, I would recommend adding a conditional statement to the plugin, so that its scripts and styles don’t load sitewide…speeding up your site, whilst resolving the conflict.

    To do this, simply open up wp-content/plugins/google-maps-widget/google-maps-widget.php in a text editor, and on line 125, replace the “enqueue frontend scripts if necessary” section with the following…

    // enqueue frontend scripts if necessary
    function enqueue_scripts() {
    	if (is_page('Contact Me')) {
    		if (is_active_widget(false, false, 'googlemapswidget', true)) {
    			wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
    			wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
    			wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
    		}
    	}
    } // enqueue_scripts

    I hope this helps!

    Cheers,
    Mark.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘fancybox page load animation looks weird’ is closed to new replies.