I am trying to create a simple sidebar like this one on semantic-ui.com, except that I want it to be on the right. It seems simple, except that the button to join is my biggest problem. You can see this on jsfiddle, sort of working ..... HTML:
<div class="ui page grid">
<div class="ui column segment">
<div class="ui thin vertical inverted labeled icon right overlay sidebar menu">abc</div>
<div class="ui black huge launch left attached button" style="display:absolute;right:0px;width:70px;">
<span class="text" style="display:none;">Sidebar</span>
<i class="icon list layout"></i>
</div>
</div>
</div>
JS:
$(".launch.button").mouseenter(function(){
$(this).stop().animate({width: '215px'}, 300,
function(){$(this).find('.text').show();});
}).mouseleave(function (event){
$(this).find('.text').hide();
$(this).stop().animate({width: '70px'}, 300);
});
$(".ui.overlay.sidebar").sidebar({overlay: true})
.sidebar('attach events','.ui.launch.button');
http://jsfiddle.net/6Ltv4/
source
share