Render mathjax when loading more comments

This commit is contained in:
cuom1999 2023-09-26 01:11:39 -05:00
parent 66bf42cb61
commit 7d517e1a7d
3 changed files with 5 additions and 2 deletions

View file

@ -386,9 +386,11 @@ function onWindowReady() {
}); });
}); });
$('a').click(function() { $('a').click(function() {
if ($(this).attr('href') === '#') { var href = $(this).attr('href');
if (href === '#' || href.startsWith("javascript")) {
return; return;
} }
$("#loading-bar").show(); $("#loading-bar").show();
$("#loading-bar").animate({ width: "100%" }, 2000, function() { $("#loading-bar").animate({ width: "100%" }, 2000, function() {
$(this).hide().css({ width: 0}); $(this).hide().css({ width: 0});

View file

@ -3,7 +3,7 @@
<h2 id="comment-header"> <h2 id="comment-header">
<i style="padding-right: 0.3em" class="fa fa-comments"></i>{{ _('Comments') }} <i style="padding-right: 0.3em" class="fa fa-comments"></i>{{ _('Comments') }}
{% if can_comment %} {% if can_comment %}
<a href="" id="write-comment" style="float: right; font-size: 0.6em; margin-right: -26px;"> {{ _('Write comment') }} </a> <a href="#" id="write-comment" style="float: right; font-size: 0.6em; margin-right: -26px;"> {{ _('Write comment') }} </a>
{% endif %} {% endif %}
</h2> </h2>
{% if can_comment %} {% if can_comment %}

View file

@ -186,6 +186,7 @@
var $comment = $("#comment-" + id + "-children"); var $comment = $("#comment-" + id + "-children");
$comment.append(data); $comment.append(data);
} }
MathJax.typeset($('#comments')[0]);
} }
}) })
} }