Javascript sidr侧面板的粘性按钮

Javascript sidr侧面板的粘性按钮,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我为我所做的事受到责备。。如果有人能帮我制作带有sidr面板的显示按钮,我将非常感激: <style type="text/css"> #panel { position: fixed; top: 50%; right: 0px; width: 115px; height: 0px; text-align:right; z-index:9999; margin-top:-15px; transform: rota

我为我所做的事受到责备。。如果有人能帮我制作带有sidr面板的显示按钮,我将非常感激:

<style type="text/css">
#panel {
    position: fixed;
    top: 50%;
    right: 0px;
    width: 115px;
    height: 0px;
    text-align:right;
    z-index:9999;
    margin-top:-15px;
    transform: rotate(-90deg);
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
}
#panel:hover {
    background: #CCC;
}
</style>

<input type="button" id="panel" value="Show" style="height:30px;width: 50px;">

<script type="text/javascript">
    $('#panel').sidr({
        side: 'right',
        displace: false
    });

</script>

在此处拉小提琴

上/下滚动时,是否希望侧边按钮跟随?
I modified the Jquery little   

 $('#panel,#panel-2').sidr({
    side: 'right',
    displace: false
});
$('#panel,#panel-2').click(function(){
    $('#panel-2').toggle();
    $('#panel').toggle();
});