Add smooth spoiler animations

Co-authored-by: Kos Furler <35310076+kosfurler@users.noreply.github.com>
This commit is contained in:
Alma Armas 2020-06-29 20:03:18 +00:00
parent b2f7d3b662
commit e3fdf75b26

View file

@ -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() { function show_write_textarea() {
var el = document.getElementById('write'); 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 document.addEventListener("DOMContentLoaded", function() { //BEGIN
u("#_photoDelete").on("click", function(e) { u("#_photoDelete").on("click", function(e) {