title: jquery .each does not work on ready
body: <p>I want to make visibility hidden some elements that have the same class. I tried to do the code below but it does not work as expected.</p>
  
  <pre><code>$(document).ready(function () {
      $('.radio').each(function () {
          $(this).attr('style', 'visibility:hidden')
      })
  })
  </code></pre>
  
  <p>I would like to make this works on load so the user can not see the elements I want to hide.</p>
  
  <p>This code works as expected when I paste it in the console.</p>
  
  <p>Anykind of help will bemuch appreciated.</p>