title: JQuery on page load instead of click live()
body: <p>I have a website that uses the following script:</p>
  
  <pre><code>//==================== EXPAND ========================//
  $('a.expand').live('click',function() {
  
      var _hide   = $(this).attr('data-hide');
  
      $(this).addClass('activeSpan');
      $(this).parent().find('.details-post').slideDown(); 
      $(this).parents('li').find('.grid-reply').slideDown(); 
      $(this).parents('li').find('.spanReply').slideDown();       
      $(this).parent().find('.textEx').html(_hide); 
      $(this).removeClass('expand');
  
      if( $(this).hasClass( 'reply' ) )
      {
          $(this).parent().find('#reply_post').focus();
      }
  });
  
  $('a.activeSpan').live('click',function() {
      var _expand = $(this).attr('data-expand');
  
      $(this).addClass('expand');
      $(this).parent().find('.details-post').slideUp();
      $(this).parents('li').find('.grid-reply').slideUp();
      $(this).parents('li').find('.spanReply').slideUp(); 
      $(this).parent().find('.textEx').html(_expand); 
      $(this).removeClass('activeSpan');
  });
  
  $('.optionsUser &gt; li:last').css({'border':'none'});
  </code></pre>
  
  <p>This is used to display data when the user clicks on "expand". Instead of this, I want the text to appear automatically. How should I change the script? I have tried changing live('click' to live('load' but this doesn't work. </p>
  
  <p>The site uses: <a href="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" rel="nofollow">https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js</a></p>
  
  <p>Thanks in advance.</p>
  
  <hr>
  
  <p>This is the php code:</p>
  
  <pre><code>&lt;!-- EXPAND --&gt;
  &lt;a data-expand="&lt;?php echo $_SESSION['LANG']['expand']; ?&gt;" data-hide="&lt;?php echo $_SESSION['LANG']['hide']; ?&gt;" class="expand getData" data="&lt;?php echo $key['id']; ?&gt;" data-token="&lt;?php echo $key['token_id']; ?&gt;"&gt;
  &lt;?php echo $icon; ?&gt;
  &lt;span class="textEx"&gt;&lt;?php echo $_SESSION['LANG']['expand']; ?&gt;&lt;/span&gt; &lt;?php echo $typeMedia; ?&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>And this is the sample html:</p>
  
  <pre><code>&lt;a data-expand="Expand" data-hide="Collapse" class="expand getData" data="697" data-token="0f1966ac9d8529055f9b0e09c0a58a65cdf5d5e8"&gt;                                  &lt;span class="textEx"&gt;Genişlet&lt;/span&gt;             &lt;/a&gt;
  </code></pre>
  
  <p>Think of facebook or twitter, you click on expand and you get an area to reply to a post. At the moment I have to click to see the reply form, but I want that to appear by default.</p>