WordPress.org

Forums

NextGEN Gallery Optimizer
[resolved] fancybox page load animation looks weird (3 posts)

  1. PhilHolmesDesign
    Member
    Posted 2 years ago #

    The page load animation (rotating spokes) between slides is off to the left side so that you see about half of it and what looks like the close window icon flashes up the right side about halfway off the black enclosure. Any idea why this is happening?

    http://wordpress.org/extend/plugins/nextgen-gallery-optimizer/

  2. PhilHolmesDesign
    Member
    Posted 2 years ago #

  3. Mark Jeldi
    Member
    Plugin Author

    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery Optimizer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic