[jQuery] strange problem
[jQuery] strange problem
Hi, all
why "$('#browsing_btns').children()" just select nothing?
---------------------
$('#browsing_btns').children().each(function(xindex){
console.log(xindex + ':'+$(this).attr('id'));
})
...
<td id="browsing_btns" colspan="4">
<input id="first_pg_btn" my_action="f" class="button" type="button"
value="first page"/>
<input id="next_pg_btn" my_action="n" class="button" type="button"
value="next page"/>
<input id="prev_pg_btn" my_action="p" class="button" type="button"
value="prev page"/>
<input id="last_pg_btn" my_action="t" class="button" type="button"
value="last page"/>
</td> ...
If I move all the bottons inside a <span>, then it works.
Jack