JSFiddle - React, Tailwind, and code Playground

by mohamm_98666

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="theme-options">
<span id="buy">User
<a href="#" class="buy theme">
  <span>Want to buy this theme</span>
  </a>  
</span>
<span id="demo">User
<a href="#" class="demo theme">
  <span>Want to request a demo</span>
  </a>  
</span>
</div>

CSS

body {
  position: relative;
}
.theme-options {
  position: fixed;
  right: 0;
  top: 40px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.theme-options span {
  display: flex;
  align-items: center;
}
.buy, .demo {
  padding: 20px 10px;
  display: block;
}
.buy span, .demo span {
 display: none;
}
a {
  text-decoration: none;
  color: #000;
  text-transform: uppercase;
}

JavaScript

$(document).ready(function($) {
    $('.theme-options').find('#buy').click(function(){

      $('.buy span').toggle(200);

    });
    
      $('.theme-options').find('#demo').click(function(){

      $('.demo span').toggle(200);

    });
  });