title: random li (list) with jQuery before page get loaded
body: <p>how I can random a list with jQuery before page get loaded?</p>
  
  <p>i found this example on the web: <a href="http://whatanswered.com/websites-javascript/random-elements-using-jquery.php" rel="nofollow">http://whatanswered.com/websites-javascript/random-elements-using-jquery.php</a>
  (you must scroll down a bit to see)</p>
  
  <p>but it works only after mouse press the button. *this is my problem, i need it to work atomatically before the page is getting loaded.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>I copied the code in this <a href="http://jsfiddle.net/yNChm/" rel="nofollow">FIDDLE</a>, if anyone would like to help, it might be usefull!</strong></p>
  
  <pre><code>$(function() {
    $('button').click(function() {
      $("div.list").randomize("div.cat");
    });
  });
  (function($) {
  $.fn.randomize = function(childElem) {
    return this.each(function() {
        var $this = $(this);
        var elems = $this.children(childElem);
        elems.sort(function() { return (Math.round(Math.random())-0.8); });  
        $this.remove(childElem);  
        for(var i=0; i &lt; elems.length; i++)
          $this.append(elems[i]);      
    });    
  }
  })(jQuery);
  </code></pre>