From e3fdf75b26342b18fa09b24c0d86c4f24b154e23 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Mon, 29 Jun 2020 20:03:18 +0000 Subject: [PATCH] Add smooth spoiler animations Co-authored-by: Kos Furler <35310076+kosfurler@users.noreply.github.com> --- Web/static/js/openvk.cls.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js index 8a868e1b..7f7412bc 100644 --- a/Web/static/js/openvk.cls.js +++ b/Web/static/js/openvk.cls.js @@ -1,15 +1,4 @@ -function hidePanel(el,count=null) { - var info = el.parentNode.children[1]; - if (info.style.display=="none") { - info.style.display="block"; - el.className = "content_title_expanded"; - if (count) el.innerHTML=el.innerHTML.replace(" ("+count+")",""); - } else { - info.style.display="none"; - el.className = "content_title_unexpanded"; - if (count) el.innerHTML+=" ("+count+")"; - } -} + function show_write_textarea() { var el = document.getElementById('write'); @@ -32,6 +21,18 @@ function edit_post(id, wid) { } } + + + + $(function () { +$('.content_title_expanded').click(function(){ + $(this).toggleClass("content_title_expanded content_title_unexpanded"); + $(this).next('div').slideToggle(300); +});}); + + + + document.addEventListener("DOMContentLoaded", function() { //BEGIN u("#_photoDelete").on("click", function(e) {