jquery show() question
<p>I have a script that builds a dynamic div with contents.  The button that initializes the build uses an onclick command and a ajax call to retrieve the appropriate info, then builds the div.  This all works great, it builds the div, and jquery shows the div and the button changes to the close button.  The problem now is that the button still has the onclick command attached to it, and I was to strip this command off, and reapply it if the user wants to view the information again.</p>

<p>The button code on initial load:</p>

<pre><code>&lt;img class="showPixFeature hidden" id="butShowImage_&lt;?php echo $row_rsFeatureAds['AdID']; ?&gt;" src="../images/class_see_more.png" align="absmiddle" onclick="getRemoteInfo('PicDetailFeature_&lt;?php echo $row_rsFeatureAds['AdID']; ?&gt;')" style="cursor: pointer" /&gt;
</code></pre>

<p>Script that builds the div:</p>

<pre><code> function showImage(IDS, selectedID){
    var adType = new Array();
    adType = IDS.split("_");
    //alert(adType);
    var thumbs = new Array();
    thumbs = adType[1].split("~");
    var adID = thumbs[0];
    //alert(adType[0] + '_' + thumbs[0]);
    var picImage = document.getElementById(adType[0] + '_' + thumbs[0]);

        removeChildren(picImage);
        var picThumbs = document.createElement('div');
        arLen = thumbs.length;
        //alert(arLen);
        if(arLen &gt; 2){
        for ( var i=1, len=arLen; i&lt;len; ++i ){
            //alert(thumbs[i]);
            var thumbNail = document.createElement('img');
        thumbNail.src = "../images/listings/" + adID + "_" + thumbs[i] + "_sm.jpg";
        thumbNail.className = "thumbNails";
        thumbNail.id = adID + '_' + thumbs[i];
        picThumbs.appendChild(thumbNail);
        picImage.appendChild(picThumbs);
        addHandler(adID, thumbs[i], 1);
        }
        }
        var previewImageContainer = document.createElement('div');
        var previewImage = document.createElement('img');
        previewImage.id = 'full_' + adID;
        previewImage.src = "../images/listings/" + adID + "_" + "1_.jpg";
        previewImage.className = 'thumbNails';
        previewImageContainer.style.width = "700px";
        previewImageContainer.style.textAlign = 'center';
        previewImageContainer.appendChild(previewImage);
        picImage.appendChild(previewImageContainer);
        var closeButton = document.createElement('img')
        closeButton.src = '../images/close_pix.png';
        closeButton.id = 'close_' + adType[0] + '_' + adID;
        picImage.appendChild(closeButton);
        addHandler(adID, 'close_' + adType[0], 2);

                $("#" + adType[0] + '_' + adID).show('blind', {}, '1300'); 
                $("#butShowImage_" + thumbs[0]).attr("src", "../images/close_pix.png");
                $("#butShowImage_" + thumbs[0]).removeClass('hidden').addClass('shown');  
        }
</code></pre>

<p>Is there a way of stipping that onclick command off?</p>

<p>Thanks for you help!</p>
