简体   繁体   中英

sticky button to sidr side panel

i have jsfiddle HERE for what i did.. and i really very would be appreciate if someone would help me hot to make that show button floating with sidr panel :)

<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();
});

Fiddle here http://jsfiddle.net/raghuchandrasorab/s9ex6g3x/2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM