title: Jquery trigger event for checkbox
body: <p>I've series of checkbox, for which I've written jquery script on click. When user clicks on checkbox it opens another series of checkbox and it goes on. Now my problem is when users checks few of those checkbox, and moves to next page and for some reason he/she comes back to checkbox page. Then I should have all the boxes which he/she has checked to open up.
  I've written a check box test when dom loads</p>
  
  <pre><code>$(document).ready(function(){
     if($('.main').is(':checked')){
        $(this).trigger('click'); 
     }else{
        //do  nothing
     }
  
    $('.main').click(function(){
        if($('.main').is(':checked')){
         var val = $(this).attr('alt');
         $('#'+val).show();
     }else{
         var val = $(this).attr('alt');
         $('#'+val).hide();
     }
    });
  });
  </code></pre>
  
  <p>As you see above. Main is the checkbox class. On click of that, am opening another series of checkbox. Now I want this to done automatically for their checked boxes when they visit the page again</p>