title: jQuery, how to disable or enable <select> element with checkbox upon page loading?
body: <p>I have a simple function which disables/enables select element when checkbox is checked/unchecked. It works well. However, once the form is submitted and the checkbox loads already checked (with help of PHP), selection is not disabled until I click on the checkbox twice.</p>
  
  <pre><code>&lt;select id="worldSelect" class="select" name="world"&gt;
  &lt;input id="worldcb" type="checkbox" checked="yes" value="any" name="world"&gt;
  any world 
  
  function toggleSelection(element){
      if (this.checked) {
          $(element.data).attr('disabled', 'disabled');
      } else {
          $(element.data).removeAttr('disabled');
      }
  }
  
  $(function() {
      $('#worldcb').click('#worldSelect', toggleSelection);
  });
  </code></pre>
  
  <p>I have tried several things, however I'm not any good with jQuery so far...</p>