Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scotch panels do not work when the containerSelector is not 'body' #25

Closed
ghost opened this issue Feb 23, 2015 · 6 comments
Closed

Scotch panels do not work when the containerSelector is not 'body' #25

ghost opened this issue Feb 23, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 23, 2015

Jquery 2.2.x,

@whatnickcodes
Copy link
Member

Can you post a codepen?

@ghost
Copy link
Author

ghost commented Feb 23, 2015

http://codepen.io/anon/pen/MYGEdZ
Notice 'super-parent' as the container.

@ghost
Copy link
Author

ghost commented Feb 23, 2015

In my own code, I was able to get it to toggle, but I had to modify the code to set a height:100% to have the panel contents show up (otherwise height was 0)

       // DOM / CSS Changes / Make Things Happen
       var setup = function() {

        // Wrap the panel!
        var container = $(panel.settings.containerSelector);
        if (!container.hasClass('scotchified')) {
            container.wrapInner('<div class="scotch-panel-wrapper"><div class="scotch-panel-canvas"></div></div>').addClass('scotchified');
        }

        // Scotch Panel Wrapper CSS
        $('.scotch-panel-wrapper').css({
            'position': 'relative',
            'overflow': 'hidden',
            'width': '100%',
            'height': '100%' // Added by Atteeela to get it to show, otherwise height was 0
        });

@whatnickcodes
Copy link
Member

Right, I saw the height was 0 too... Weird. Let me look into tonight and I'll get back to you.

@ghost
Copy link
Author

ghost commented Feb 23, 2015

Thanks.

@whatnickcodes
Copy link
Member

Super parent only wraps header. You need to wrap the entire contents:

Aka start at after and end before .

Right now, super parent only wraps the panel - which is weird...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant