Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <table id="news_list" border='1'>
    <tr>
        <td>
            <input type="checkbox" name="news[1]" />
        </td>
        <td>TEXT</td>
    </tr>
</table>
</body>
</html>
 
$(function(){
  $("#news_list tr").click(function () {
    var ele = $(this).find(':checkbox');
    if ($(':checked').length) {
        ele.prop('checked', false);
        $(this).removeClass('admin_checked');
    } else {
        ele.prop('checked', true);
        $(this).addClass('admin_checked');
    }
  });
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers