You can use css and jquery, I’ll give an example here, in this example when clicking on the div it appears on the screen.
First you "hide" it using css:
.janela{
width: 100px;
height: 100px;
border:1px solid #f00;
margin-top: -90px;
position:fixed;
}
And then you show using jquery:
$(function(){
$( ".janela" ).click(function() {
$(this).animate({
marginTop: 0
}, 1500 );
});
});
Upshot: https://jsfiddle.net/9stsct8r/
Update:
This way the screen appears when clicking and hides while clicking again, it checks the margin-top and performs the action:
$(function(){
alert($(".janela").css('margin-top'));
$(".janela").click(function() {
var pos = parseInt($(this).css('margin-top').replace("px", ""));
if(pos == 0){
$(this).animate({
marginTop: -90
}, 1500 );
}else{
$(this).animate({
marginTop: 0
}, 1500 );
}
});
});
Upshot: https://jsfiddle.net/9stsct8r/1/
That’s not a navbar? I think the picture is clearer.
– UzumakiArtanis
So, it’s like the Nav bar dropdown, but in case it would be the right of the page and kind of would be hidden. I’ll look for the image
– Julio Henrique