JSFiddle - React, Tailwind, and code Playground
by chopper
HTML
<div id="mobile_no" class="cookiepopup hide">
Mobile No
</div>
<div id="mobile_yes" class="cookiepopup">
Mobile Yes
</div>
<button id="toggle">Toggle Mobile</button>
CSS
/* COOKIE POPUP */
.cookiepopup {
color: white;
background: #eee; border-top:1px solid #ddd;
bottom: 0;
padding: 5px 2% 10px;
position: fixed;
width: 96%;
z-index: 10;
font-size:0.8em;
}
#mobile_no {
background-color: red;
}
#mobile_yes{
background-color: green;
}
.hide {
display: none;
}
JavaScript
$('#toggle').click(function(){
$('#mobile_yes, #mobile_no').toggleClass('hide');
});