fix show-more display

This commit is contained in:
zhaospei 2023-02-06 23:25:50 +07:00
parent 88943f40fb
commit 4e7b8daada
6 changed files with 10 additions and 7 deletions

View file

@ -33,13 +33,13 @@
<script type="text/javascript">
function activateBlogBoxOnClick() {
$('.show-more').on('click', function () {
var $description = $(this).parent().children('.blog-description');
var $blogbox = $(this).parent().parent();
var $description = $blogbox.children('.blog-description');
var max_height = $description.css('max-height');
if (max_height !== 'fit-content') {
$description.css('max-height', 'fit-content');
$(this).parent().css('cursor', 'auto');
$(this).parent().removeClass('pre-expand-blog');
console.log($(this).parent());
$blogbox.css('cursor', 'auto');
$blogbox.removeClass('pre-expand-blog');
$(this).hide();
}
})