User:Porter21/Popups.js

/* CSS .va-popup { display:inline-block; position: relative; }

.va-popup-expanded { background: #F2F2F2; box-shadow: 1px 2px 10px 0 black; position: absolute; }

.va-popup-click .va-popup-expanded { left: 0; top: 100%; }

.va-popup-hover .va-popup-expanded { left: 0; top: 0; }

.va-popup .va-popup-expanded { display: none; }

.va-popup .va-popup-shrunk { display: block; }

.va-popup-active .va-popup-expanded { display: block; }

.va-popup-click.va-popup-active .va-popup-shrunk { background: #F2F2F2; border-radius: 5px; } /* HTML Shrunk Expanded       Shrunk Expanded

// JS $('.va-popup-click').click(function {       $(this).addClass('va-popup-active');    }).mouseleave(function{     $(this).removeClass('va-popup-active');   });

$('.va-popup-hover').hover(  function  {      $(this).addClass('va-popup-active');   }, function  {      $(this).removeClass('va-popup-active');   });