JSFiddle - React, Tailwind, and code Playground
by sarfarazdesigner
HTML
<div id="popshbtn" onclick="uiSlide(this, '#popwrap', 'right')">
<p>Feedback</p>
</div>
<div id="popwrap" class="popdnone">
<h3 class="h3">Support</h3>
</div>
CSS
#popshbtn{
background-color: #3385D6;
color: #FFFFFF;
font-size:16px;
width:38px; height:188px;
border:1px solid #2d7dcb;
text-align:center;
cursor:pointer;
position:absolute;
bottom:2%;
right:0;
z-index:999999;
}
#popshbtn:hover{
background:#2d7dcb;
}
#popwrap{
width:478px;
border:1px solid #ccc;
padding:10px;
background:#f5f5f5;
position:absolute;
top:20%;
right:-500px;
margin-left:-500px;
display:none;
height:400px;
}
body{overflow-x:hidden;}
JavaScript
$(document).ready(function(e) {
$('#popshbtn').click(function(){
if($('#popwrap').hasClass('popdnone')){
$('#popwrap').show().animate({
right: 0
},'fast', function(){
$('#popwrap').removeClass('popdnone');
})
}
else{
$('#popwrap').show().animate({
right: '-500px'
},'fast', function(){
$('#popwrap').hide().addClass('popdnone');
})
}
})
$('#popshbtn').html($('#popshbtn').text().replace(/(.)/g,"$1<br />"));
});