for (var i = 0; I < 2; iPP) {
$("-sharpactivity_time"+i+" a").removeClass("buy_button");
}
<input type="hidden" name="activity_time" id="activity_time0" value="2018/4/25 16:13:59" />
<a href="-sharp" class="buy_button"></a>
< / div >
<input type="hidden" name="activity_time" id="activity_time1" value="2018/4/25 16:13:59" />
<a href="-sharp" class="buy_button"></a>
< / div >
problem: the style has not been removed
because an is not a descendant of input at all. My input is a self-closing label.
< hr > CSS [attribute~=value] selector