SHARE
TWEET

Untitled

a guest Nov 19th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <style type="text/css">
  2. .media-action-bar {
  3.     padding:10px;
  4.     display:block;
  5. }
  6.  
  7. .likeBtn {
  8.     transition: background 0.5s;
  9. }
  10. .likeBtn.liked {
  11.     background-color:#E68181;
  12.     border-color:#D66969;
  13. }
  14.  
  15. .formControlLike {
  16.   width: 400px;
  17.     border-radius: 10px;
  18.     resize: none;
  19.     height: 44px;
  20.     padding: 10px;
  21.     font-size: 14px;
  22. }
  23.  
  24. .likeBtn {
  25.   background: #2c73b5;
  26.   padding: 5px 10px;
  27.   text-decoration: none;
  28.   border: 1px solid #00519c;
  29.   color: #fff;
  30.   font-weight: none;
  31.   border-radius: 6px;
  32. }
  33. </style>
  34. <div class="container">
  35.     <div class="row">
  36.         <div class="col-sm-12">
  37.             <div class="media-action-bar">
  38.               <!-- Comment-box -->
  39.               <div class="comments">
  40.                   <div class="comment-box">
  41.                       <form id="formForLike">
  42.                       <textarea class="formControlLike" rows="3" placeholder="Describe why you want to like this person" required></textarea>
  43.                       <br/>
  44.                       <button type="submit" class="likeBtn" href="#">&#128077;<span id="likeText">Like</span> <b>(<span id="likeNumber">0</span>)</b></button>
  45.                       </form>
  46.                   </div>
  47.               </div>
  48.             </div>
  49.         </div>
  50.     </div>
  51. </div>
  52. <script>
  53. $(function() {
  54.   $("#formForLike").on("submit", function(e) {
  55.     e.preventDefault();
  56.     $(".formControlLike").css('display','none');
  57.     $("#likeText").html("You liked person");
  58.     $(".likeBtn").addClass("liked");
  59.     $("#likeNumber").html("1");
  60.   });
  61. });
  62. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top