WordPress.org

Forums

WP RSS Multi Importer
[resolved] Disable background scrolling when colorbox layer is active (3 posts)

  1. Astroyka
    Member
    Posted 2 years ago #

    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/

  2. Astroyka
    Member
    Posted 2 years ago #

    Fixed it :P

    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 :)

  3. Astroyka
    Member
    Posted 2 years ago #

    // closed

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.