get id parameter and increment count for each click in jquery

Posted by Jean on Stack Overflow See other posts from Stack Overflow or by Jean
Published on 2010-06-13T10:06:42Z Indexed on 2010/06/13 10:12 UTC
Read the original article Hit count: 216

Filed under:

Hello,

I want to get the id value of c_i. And each time c_i is clicked I want to increment the value at chk_count, using jquery

<div id='d<? echo $i; ?>' style='margin-bottom:8px; border:#cccccc thin solid; height:25px;'>
            <span style='color:#cccccc; margin-right:5px;'><? echo $i; ?></span>
            <span><? echo $row_dw_all['d1e']; ?></span>

            <span style='position:absolute;right:0px;'>
            <input type='checkbox' name='c_i<? echo $i; ?>' id="c_i<? echo $i; ?>" value='<? echo $row_dw_all['dle']; ?>'>
            </span>

            </div>

<input type="hidden" name="chk_count" id="chk_count" value="" />

Thanks Jean

© Stack Overflow or respective owner

Related posts about jQuery