I have function on jQuery who by onclick event send post request and change value in table row.
How i can do it mass? For example, i have button "Check all" on click this, i call function.
I want to click-once summoned all the check
and then they started to be executed
pseudo code:
<ul>
<li id=1>text1</li>
<li id=2>text2</li>
<li id=3>text3</li>
</ul>
<button id="checkall">check all</button>
<script>
function check(id) { /* ... */ }'
on('click', '#checkall', {
$("ul li").each(function() {
check(this.attr('id'));
});
});
</script>
Yes, i know thats its stupid idea, but, how i can do it? ^_^
Thanks.