JSFiddle - React, Tailwind, and code Playground
by Mawel Don
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<script src=" https://getfirebug.com/firebug-lite-debug.js"></script>
<div id="topDestGlobalLink"><i class="fa fa-star-o"></i></div>
<div id="topDestGlobal">
<h2>DESTINATIONS PREFEREES</h2>
<ul>
<li><a href="http://www.agencedevoyage.com/voyage/asie/vietnam/">Circuit Vietnam pas cher</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/afrique/afrique-du-sud/">Circuit organisé Afrique du sud</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/asie/inde/">Autotour Inde</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/asie/laos/">Circuit touristique Laos</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/asie/cambodge/">Voyage au Cambodge</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/ameriques/perou/">Voyage organisé Pérou</a></li>
<li><a href="http://www.agencedevoyage.com/voyage/asie/thailande/">Voyage Thailande circuit</a></li>
</ul>
</div>
CSS
/* topDest */
/* line 263, ../sass/screen.scss */
#topDestGlobalLink {
background: none repeat scroll 0% 0% #0d9dec;
color: #fff;
position: fixed;
right: 0;
top: 150px;
font-size: 30px;
padding: 10px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
z-index: 200;
}
/* line 274, ../sass/screen.scss */
/* line 283, ../sass/screen.scss */
#topDestGlobal {
display: table;
border: 3px solid #39A9DC;
position: fixed;
z-index: 200;
max-width: 220px;
top: 150px;
right: 0;
display: none;
width: 100%;
}
/* line 293, ../sass/screen.scss */
#topDestGlobal:hover {
display: inline-block;
}
/* line 296, ../sass/screen.scss */
#topDestGlobal * {
text-decoration: none;
font-family: "Helvetica Neue";
}
/* line 300, ../sass/screen.scss */
#topDestGlobal ul {
background-color: #fff;
padding: 5px 0px 5px 10px;
}
/* line 304, ../sass/screen.scss */
#topDestGlobal > a {
color: #ffffff;
display: block;
line-height: 30px;
margin: 0 -3px -3px;
padding: 0 3px;
text-align: center;
width: 100%;
background: #ff9c00;
background: -moz-linear-gradient(-45deg, #ff9c00 0%, #ef7f09 35%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #ff9c00), color-stop(35%, #ef7f09));
background: -webkit-linear-gradient(-45deg, #ff9c00 0%, #ef7f09 35%);
background: -o-linear-gradient(-45deg, #ff9c00 0%, #ef7f09 35%);
background: -ms-linear-gradient(-45deg, #ff9c00 0%, #ef7f09 35%);
background: linear-gradient(135deg, #ff9c00 0%, #ef7f09 35%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9c00', endColorstr='#ef7f09',GradientType=1 );
text-align: center;
}
/* line 321, ../sass/screen.scss */
#topDestGlobal > a:hover {
background: #39a9dc;
background: -moz-linear-gradient(-45deg, #39a9dc 0%, #1686b9 35%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #39a9dc), color-stop(35%, #1686b9));
background: -webkit-linear-gradient(-45deg,...
JavaScript
document.getElementById("topDestGlobalLink").addEventListener("click",function(){
if(this.className == "clicked"){
this.className = "";
this.style.right = "0";
this.childNodes[0].className="fa fa-star-o";
document.getElementById("topDestGlobal").style.display = "none";
}
else
{
this.className += "clicked";
this.style.right = "226px";
this.childNodes[0].className="fa fa-star";
document.getElementById("topDestGlobal").style.display = "inline-block";
}
})