jqueryを使用して一意のpassnum値を別のゾーン情報に渡そうとしているので、passnum情報は特定のゾーンに固有です。たとえば、zone1はpassnum = 100であり、zone2は50である可能性があります。
<h5> </h5>
jqueryを使用して、ゾーンに基づいて各ゾーンに一意のpassnum値を渡すことは可能ですか?何百ものゾーンブロックが動的に作成される可能性があるためです。
<div class="wrapper" class="zone1">
other divs here (could have unknown amount of div block or tages here
<div ><span class="pass-num"><h5>some num </h5></span> </div>
</div>
<div class="wrapper" class="zone2">
other divs here (could have unknown amount of div block or tages here
<div><span class="pass-num"><h5>some num(pass val here) </h5></span> </div>
</div>
I have cthe ode below which works when u know the zone and structure
$(document).ready(function() {
var passnum ="110";
var passtext="All";
$('div.pass-text>h4').text(passtext);
$('div.pass-num>h4').text(passnum);
});
</script>