从左向右滑动

Slide from left to right

我一直在搜索并尝试了很多东西,但我找不到解决方案;

#bar {
    width: 2em;
    height: 15em;
    display: none;
    position: relative;
    float: left;
    margin-left: -1.7em;
    background: rgba(22, 43, 58, 0.4);
}
#button {
    width: 2em;
    height: 1.3em;
    float:left;
    position: relative;
    margin-top: 0.7em;
    margin-left: 0.em;
    background: rgba(22, 43, 58, 0.4);
    color: rgba(250, 250, 250, 0.7);
    font-size: 1em;
    border-radius:0px 5px 5px 0px;
    text-shadow: 1px 1px 2px;
    cursor: pointer;
    border: none;
    opacity: 0.8;
}

我希望当我按下按钮时,条会向右滑动。

$(document).ready(function () {
    $('#button').click(function () {
        $("#bar").show('slide', {
            direction: 'right'
        }, 1500);
    });
});

这是HTML部分

<div class="apps border">
    <div id="bar"></div>
    <div id="button">>></div>
    <div class="field"></div>
</div>

Demo

请检查更新版本:https://jsfiddle.net/isherwood/gc3b8n9q/

在JS中,方向应该是'left'

$("#bar").show('slide', {
  direction: 'left'
}, 1500);

也在 CSS(不是直接需要)

#bar {
    width: 20em; //can try make bigger
}