JavaScript jQuery sliding panels - close one panel when opening another one/How to open one panel only? jquery sliding panels,jquery sliding panel demo,jquery sliding panel

I have three sliding panels in my html. The thing is that panels overlay each other when open. I would like to get a function that create an event when one panel (eg. #panel1) is open already and the user will click on the other one (#panel2) then the first one (#panel1) will slide out so there can be only one panel open at a time.

Anyone can help me with that??

Thanks in advance.

HTML:

    <ul id="menu">
        <li><img id="icon_1" src="images/image1.png"></li>
        <li><img id="icon_2" src="images/image2.png"></li>
        <li><img id="icon_3" src="images/image3.png" ></li>
    </ul>

    <div id="panel1"></div>
    <div id="panel2"></div>
    <div id="top_panel"></div>

jQuery (#panel1 and #panel2 function taken from http://web.archive.org/web/20150227082803/http://www.jqeasy.com/jquery-slide-panel-plugin):

    $(document).ready(function(){
        $('#panel1').slidePanel({
            triggerName: '#icon_1',
            speed: 'slow'
    });
        $('#panel2').slidePanel({
            triggerName: '#icon_2',
            speed: 'slow'
        });   
    });

    $(document).ready(function(){
        $("#icon_3").click(function(){
            $("#top_panel").slideToggle("slow");
        });
    });
Answer:1

I have a Meteor method that I call from the client, which in turn updates all fields in a single document. In the last line of code below I try to immediately run the same update on the client to get ...

I have a Meteor method that I call from the client, which in turn updates all fields in a single document. In the last line of code below I try to immediately run the same update on the client to get ...

  1. meteor shower side effects

I'm trying to create a select list control that supports data with a tree structure and has typeahead capability. The data looks like this: Category -> SubCategory Category2 -> ...

I'm trying to create a select list control that supports data with a tree structure and has typeahead capability. The data looks like this: Category -> SubCategory Category2 -> ...

  1. typeahead select list
  2. typeahead select dropdown
  3. typeahead select only from list

I'm using the Twitter oembed api, and now have the following code on my page: <div class='row'> <iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" ...

I'm using the Twitter oembed api, and now have the following code on my page: <div class='row'> <iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" ...

  1. center twitter embed
  2. center twitter embed wordpress
  3. centre twitter embed

If I try to extend an entity in Breeze via constructor with something like: breeze.EntityManager('ServiceUrl').metadataStore.registerEntityTypeCtor( 'customer', function () { this.orders = ko....

If I try to extend an entity in Breeze via constructor with something like: breeze.EntityManager('ServiceUrl').metadataStore.registerEntityTypeCtor( 'customer', function () { this.orders = ko....