JSFiddle - React, Tailwind, and code Playground

New App Banner

by DugSohn

HTML

<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.0.1/tinymce.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="jquery.sidr.light.js"></script>
<link rel="stylesheet" href="https://dl.dropboxusercontent.com/s/nd1mexyy0xevhv5/6fdc3a856a26e706a3edad566422a903.css?dl=0/6fdc3a856a26e706a3edad566422a903.css?yakabox-vne-5.21.4-1">
<script src="https://rawgit.com/desandro/masonry/v2.1.08/jquery.masonry.js"></script>
<div class="container-fluid">
  <div class="col-xs-8">
    <br/>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>

    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong> about a <strong>thing</strong></div>
    <div class="alert alert-info"><i class="fa fa-square fa-2x"></i>
      <strong>This</strong> is an <strong>av message</strong>...

SCSS

@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600,700);

body {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;    
}

#ActivityL istItemsCloud li {
  display: inline-block;
  padding: 5px 10px;
  float: left;

 a {
   text-decoration: none;
 }
}

.alert-warning {
    color: #fff;
    background-color: orange;
    border-color: #faebcc;
    border-radius: 2px;
    padding: 11px 10px;
    font-weight: 400;
    text-shadow: 1px 1px 1px rgba(0,0,0,.5);
    transition: all ease-in .2s;
    font-weight:600;
}

#ActivityListItemsCloud li:nth-child(odd) {
a {
    color: #05a5d1;
  }
}

#ActivityListItemsCloud li:nth-child(2) {
a {
    color: #05a5d1;
    font-weight:bold;
  }
}

#ActivityListItemsCloud.nav>li>a {
    padding: 5px 5px;
    word-wrap: break-word;
    -ms-word-wrap: break-word;
}
#ActivityListItemsCloud li {
    padding: 0;
}
#ActivityListItemsCloud.nav>li.active>a {
    color:#ffffff;
    background-color: #05a5d1 ;
}

.slide-in-bottom {
	-webkit-animation: slide-in-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	        animation: slide-in-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* ----------------------------------------------
 * Generated by Animista on 2019-4-18 13:26:42
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation slide-in-bottom
 * ----------------------------------------
 */
@-webkit-keyframes slide-in-bottom {
  0% {
    -webkit-transform: translateY(50px);
            transform: translateY(50px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slide-in-bottom {
  0% {
    -webkit-transform: translateY(30px);
            transform: translateY(30px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0);
           ...

JavaScript

$(function() {

  var $container = $('#ActivityListItemsCloud').masonry({
    itemSelector: '.ybx-activityui-clouditem',
    columnWidth: 70
  });


  $('.ybx-activityui-clouditem').click(function() {
    var numbers = $('.badge').html();
    var iNum = parseInt(numbers); //Output will be 234.
    $(this).toggleClass('active');

    if ($(this).hasClass('active')) {
      $('.ybx-remove').show();
      $('.alert-info:nth-child(odd)').hide('slow');
//           $('.alert-info').filter(':visible').filter(':odd').hide('slow')

    } else {

      if ($('#ActivityListItemsCloud').find('li').not($(this)).hasClass('active')) {
        $('.ybx-remove').show();
        
      } else {

        if (!$(this).hasClass('active')) {
          $('.ybx-remove').hide();
          $('.alert-info:nth-child(odd)').show('slow')
          $('.badge').html('23');
        }
      }
    }

    if ($(this).hasClass('.active')) {
      $('.badge').html(iNum - 23);
    } else {
      $('.badge').html(iNum + 23);
    }
  });

  $('.ybx-remove').click(function() {
    var $visableAlerts = $('.alert').is('visible')

    $('.active').not('.ui-discovered').addClass('flip-out-hor-top');

    setTimeout(
      function() {
        $('.active').not('.ui-discovered').remove();
      }, 300);

    setTimeout(
      function() {
        $('.alert-info:nth-child(odd)').remove();
      }, 500);

    $('.alert-warning').hide();

    setTimeout(
      function() {
        $container.masonry();
      }, 300);
  });
});