Trying to call a jquery function with no event
<p>So turning and image into a link like this</p>

<pre><code>var imgCell = '&lt;a href="javascript:storeInfo(&amp;quot;text&amp;quot;,&amp;quot;text&amp;quot;,&amp;quot;ActiveProjects&amp;quot;);"&gt;&lt;img src="https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_open.png"&gt;&lt;/a&gt;';
</code></pre>

<p>This calls the storeInfo function which will take the "text" "text" and "activeprojects and set them to global variables so they can be used by multiple javascript functions... </p>

<pre><code>function storeInfo (filePath, webAddress, projectStatus){
theFilePath = filePath;
theWebAddress = webAddress;
controlButton(projectStatus);}
</code></pre>

<p>Then within the storeInfo function I call this function...</p>

<pre><code>function controlButton (projectStatus){
$('#'+projectStatus+' tbody td img').live('click', function () {
    var theTable = ActiveProjectsTable;

    var nTr = this.parentNode.parentNode.parentNode;
    if ( this.src.match('details_close') )
        {
            // This row is already open - close it 
            this.src = "https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_open.png";
            theTable.fnClose( nTr );
        }
    else
        {
            // Open this row 
            this.src = "https://cubistmediagroup.sharepoint.com/sites/canvas/PublishingImages/details_close.png";
            theTable.fnOpen( nTr, fnFormatDetails(theTable, nTr), 'details' );
        }
});
}
</code></pre>

<p>So one the first click of the img it calls the store info function which in return calls the controlButton function... Then within the control button function there is the jquery code function which requires another click... I want to know if there is a way to call the jquery function with no event so that I dont need 2 clicks.</p>

<p>How can I just call the jquery function once controlButton is called? </p>
