User2103319870 posted
is there a way to make $("js-page-alerts") into a variable?
You can try with the below code
<script>
$(document).ready(function () {
var pgalert = $(".js-page-alerts");
if (pgalert != null || pgalert != "undefined") {
if ($.trim(pgalert.text()).length > 10) {
$(".ins-alert").css("display", "inherit");
}
}
});
</script>