user2301655
user2301655

Reputation: 1

Sliding Panel Reveal

I have already made a sliding panel with simple jQuery, but it is not exactly what I wanted.

What I want, is literally this, but only the panel that appears when you click "Reveal". Right now, my panel does the "Overlay" command, which I do not want. I tried to extract the code from the website above, but it's a mess.

I would be really grateful if any of you could come up with a sliding panel "Reveal". Preferably using jQuery.

Thank you in advance!

This is my current code:

$(document).ready(function(){
    $('#show_menu').on('click' , function() {
        $('div.panel').animate({
            'width' : 'show'} ,500,
            function() {
                $('div.home').fadeIn(400);
        });
    });

    $('span.close').on('click' , function() {
        $('div.home').fadeOut(400 , function() {
            $('div.panel').animate({
                'width':'hide'}, 500);
            });
        });
});

Upvotes: 0

Views: 464

Answers (1)

SPQR
SPQR

Reputation: 524

This answer is late but for anyone stopping by, here is a good starting point for jQuery Mobile and "Revealing" panels.

There are examples for both a right and left sliding panel and the source is readily available.

Upvotes: 1

Related Questions