From cc23feb2a128734f933f4f596d0a8ecebbd7c45f Mon Sep 17 00:00:00 2001 From: wowthemesnet Date: Fri, 1 Mar 2019 17:32:36 +0200 Subject: [PATCH] added blurred spoiler --- assets/css/screen.css | 7 +++++++ assets/js/mediumish.js | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/assets/css/screen.css b/assets/css/screen.css index 2a77c14897..6a215be139 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -664,4 +664,11 @@ License: https://www.wowthemes.net/freebies-license/ } .sticky-top-80 { top:80px; +} + +.spoiler { + color: transparent; + text-shadow:0 0 6px rgba(0,0,0,0.2); + transition: all .4s; + cursor:pointer; } \ No newline at end of file diff --git a/assets/js/mediumish.js b/assets/js/mediumish.js index c2a14e93a0..b67504567a 100644 --- a/assets/js/mediumish.js +++ b/assets/js/mediumish.js @@ -88,11 +88,8 @@ jQuery(document).ready(function($){ $('.site-content').css('margin-top', $('header').outerHeight() + 'px'); // spoilers - $("span.spoiler").hide(); - $('Reveal Spoiler >> ').insertBefore('.spoiler'); - $("a.reveal").click(function(){ - $(this).parents("p").children("span.spoiler").fadeIn(1500); - $(this).parents("p").children("a.reveal").fadeOut(0); - }); + $(document).on('click', '.spoiler', function() { + $(this).removeClass('spoiler'); + }); });