.on("click", "img", function (e) not working after Postback
<p>I have the following JQuery code :-</p>

<pre><code> $('.rpItem').on("click", "img", function (e) {
    alert('here');
    var text = $(this).siblings('span.rpText').text();
    e.preventDefault();
    e.stopPropagation();

    var args = {
        reportName: text
    };
    $.ajax({
        type: "POST",
        url: "Dashboard.aspx/AddToFavourites",
        data: JSON.stringify(args),
        contentType: "application/json;charset=utf-8;",
        success: function (data) {
            __doPostBack('#MainMenuUP', text);
            //__doPostBack('&lt;%= MainMenuUP.ClientID %&gt;', text);
        },
        error: function () {
        }
    });
});


$("#reports_textSearch").keyup(function () {
    var textLength = $(this).val().length;
    delay(function () {

        if (textLength == 0) {
            emptySearchString();
        }

        if (textLength &gt; 2) {
            var args = {
                reportName: document.getElementById('reports_textSearch').value
            };
            doSearchString(args);
        }
    }, 1000);

});

function doSearchString(args) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "Dashboard.aspx/FetchReports",
        data: JSON.stringify(args),
        dataType: "json",
        success: function (data) {
            //__doPostBack('#MainMenuUP', data.d);
            __doPostBack('&lt;%= MainMenuUP.ClientID %&gt;', data.d);  
        },
        error: function (data) {
        }
    });
}
</code></pre>

<p>and the first time its working fine.  However after the postback, the doSearch keeps on working correctly, whilst the </p>

<pre><code>$('.rpItem').on("click", "img", function (e) {
</code></pre>

<p>fails.  It is not even going through that code. </p>

<p>I tried to replace the</p>

<pre><code>__doPostBack('&lt;%= MainMenuUP.ClientID %&gt;', data.d); 
</code></pre>

<p>with</p>

<pre><code>__doPostBack('&lt;%= MainMenuUP.UniqueID %&gt;', data.d);
</code></pre>

<p>but that just does a page refresh which I do not want.</p>

<p>Any help will be very much appreciated!</p>

<p>Thanks </p>
