jquery toggle slide from left to right and back

后端 未结 5 1635
既然无缘
既然无缘 2021-02-05 19:00

I have a \"Menu\" button on the left hand side of the page and once selected I have a div containing the menu items show. I then have another button that can be selected to hid

5条回答
  •  庸人自扰
    2021-02-05 19:06

    Sliding from the right:

    $('#example').animate({width:'toggle'},350);
    

    Sliding to the left:

    $('#example').toggle({ direction: "left" }, 1000);
    

提交回复
热议问题