$('#catalog ul li').each(function (m) {
<script src="
<ul>
<li data-num="40"></li>
<li data-num="433"></li>
<li data-num="407"></li>
<li data-num="194"></li>
<li data-num="100"></li>
<li data-num="539"></li>
<div class="mybox" style="min-height:75vh;">
<li data-num="554"></li>
<li data-num="273"></li>
<li data-num="504"></li>
<li data-num="415"></li>
<link rel="stylesheet" type="text/css" href="https://cdn.shucdn.com/css/style.css">
<li data-num="254"></li>
<li data-num="347"></li>
activeSubjectsObject.value = htmlArr[j];
<li data-num="394"></li>
<li data-num="178"></li>