js
PHP Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script language="javascript">
    $(document).ready(function(){ 
        $("input[type=checkbox].selAllChksInGroup").on("click.chkAll", function( event ){
             $(this).parents('.control-group:eq(0)')
                    .find(':checkbox')
                    .prop('checked', this.checked);
        })    
            
        $('td').hover(function(){
            var row_index = $(this).parent().index('tr');                
            var col_index = $(this).index('tr:eq('+row_index+') td');                
            var m = "Satır :"+(row_index)+' Sutun : '+(col_index);
            $("#son").html(m);    
        })
        
        $("#b_"+row_index).bind("click",function(){
                var v = $(this).attr("id");
                alert (v);
            
            })    

     });
</script>

         $i=0;        
        while ($row = mysql_fetch_array($result)) {
            $i++;
            if ($row["OrderID"] != '') {                
                  echo '
                    <tr class="tr'.$i.'">
                        <td><div><input type="checkbox" value="'.$row["CustomerID"].'" name="c'.$i.'"> </div></td>
                        <td><div>' . $i                 . '</div></td>
                        <td><div>' . $row["OrderID"]     . '</div></td>
                        <td><div>' . $row["CustomerID"] . '</div></td>
                        <td><div>' . $row["ShipAddress"]. '</div></td>
                        <td><div>' . $row["ShipCity"]     . '</div></td>    
                        <td><div><button id="b_'.$i.'" >OK </button></div></td>    
                    </tr> 
when i click the button i can not get own row id