• Resolved Astroyka

    (@astroyka)


    Hi,

    I’m trying to disable the background layer so that it doesn’t scroll when the colorbox layer is open.

    Googling points to something like:

    $(document).bind('cbox_open', function() {
        $('body').css({ overflow: 'hidden' });
    }).bind('cbox_closed', function() {
        $('body').css({ overflow: '' });
    });

    I’m unsure where this jQuery would go in relation to the plugin or what it needs to be bound to.

    Any ideas?

    Thanks.

    http://wordpress.org/extend/plugins/wp-rss-multi-importer/

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

    (@astroyka)

    Fixed it 😛

    Added this to my external JS file which loads after all WP/Plugin JS requests:

    jQuery(document).ready(function(){
    $(document).bind('cbox_open', function() {
        $('html').css({ overflow: 'hidden' });
    }).bind('cbox_closed', function() {
        $('html').css({ overflow: '' });
    });
    });

    Works a treat 🙂

    Thread Starter Astroyka

    (@astroyka)

    // closed

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable background scrolling when colorbox layer is active’ is closed to new replies.