title: How to call a jQuery function with no event
body: <p>I'm trying to make a dataTable expand on a click to show more information. The problem is that I'm populating the table through around 1000 records so the only way I can keep the more details data (what expands) is to send the data through a link during the looping process like so...</p>
  <pre><code>var imgCell = '&lt;a href=&quot;javascript:storeInfo(&amp;quot;'+theFilePath+'&amp;quot;,&amp;quot;'+theWebAddress+'&amp;quot;,&amp;quot;'+projectStatus+'&amp;quot;);&quot;&gt;&lt;img src=&quot;https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_open.png&quot;&gt;&lt;/a&gt;';
  </code></pre>
  <p>So that makes a image link that calls this function on click...</p>
  <pre><code>function storeInfo (filePath, webAddress, projectStatus)
  {
  theFilePath = filePath;
  theWebAddress = webAddress;
  
  switch(projectStatus){
  case &quot;New Work - Waiting Activation&quot;:
      controlButton(&quot;NewWork&quot;, NewWorkTable);
  break;
  case &quot;Active Projects&quot;:
      controlButton(&quot;ActiveProjects&quot;, ActiveProjectsTable);
  break;
  case &quot;Waiting for Assets or Approvals&quot;:
      controlButton(&quot;WaitingAssets&quot;, WaitingAssetsTable);
  break;
   //AND A WHOLE LOT MORE CASES
      }   
  }
  </code></pre>
  <p>Basically this function saves the filepath and webaddress to global variables to be used later one and then calls the <code>controlButton</code> Function...</p>
  <pre><code>function controlButton (projectStatus, theTable){
  $('#'+projectStatus+' tbody td img').live('click', function () {
       
      var nTr = this.parentNode.parentNode.parentNode;
      if ( this.src.match('details_close') )
          {
              // This row is already open - close it 
              this.src = &quot;https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_open.png&quot;;
              theTable.fnClose( nTr );
          }
      else
          {
              // Open this row 
              this.src = &quot;https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_close.png&quot;;
              theTable.fnOpen( nTr, fnFormatDetails(theTable, nTr), 'details' );
          }
       });
  }
  </code></pre>
  <p>What this does is get the img in the html table then find the row its in then calls a function that opens or closes the expandable data... This is done with  <code>fnOpen</code> and <code>fnClose</code> and using <code>fnFormatDetails</code> to populate the expandable row...</p>
  <p>This all works fine and dandy and everything gets passed in properly and loads great but the only problem is that it requires two clicks to open and close the expandable row... Once for the link on the image then another to call the jQuery function. I need a way to get around this and just have it be one click while still loading the data for each individual entry... I was thinking the best way would be to find a way to call the jQuery function without the <code>.live('click', function()</code> because that would eliminate the need for a second click.</p>
  <p>Any Suggestions?</p>