title: Adding a class to checked input
body: <p>I want to do sth like this: if one of inputs is defautly selected add the class to his table parent.
  I have original code which adds or removes the class to chosen input:</p>
  
  <pre><code>$('.table tr.table-selection').click(function() {
  $('.table tr').removeClass('success').find('input').prop('checked', false); 
  $(this).addClass('success').find('input').prop('checked', true); 
  });
  </code></pre>
  
  <p>So, I tried to add similar code:</p>
  
  <pre><code>$('.table tr.table-selection').ready(function() {
  $(this).addClass('success').find('input').prop('checked', true); 
  });
  </code></pre>
  
  <p>But it doesn't work. I'm not well familiar with jQuery, what should I change?</p>