JQuery .click() event not firing in IE 8 and asp.net update panel
<p>Hello all I am experiencing some strange issue with a website and some jquery on a click event. 
Within IE 9 firefox and chrome this works fine. However IE 8 will not fire the click event. </p>

<p>This is an asp.net webform wrapped in an update panel. ]</p>

<p>aspx code</p>

<pre><code>&lt;asp:UpdatePanel ID="searchupdatePanel" runat="server" UpdateMode="Conditional"&gt;
    &lt;ContentTemplate&gt;
        &lt;div id="search" class="searchcontainer"&gt;
            &lt;asp:TextBox ID="tbsearchterm" CssClass="watermark" runat="server" /&gt;

            &lt;a href="#" class="button big left" id="btnSave"&gt;Save&lt;/a&gt; 

        &lt;/div&gt;
    &lt;/ContentTemplate&gt;
&lt;/asp:UpdatePanel&gt;
</code></pre>

<p>Within my js file I have the following this code is wrapped inside of a onPageLoad function</p>

<pre><code>function pageLoad() {
...
    //SimpleModal Save Dialog
    $(function () {
        $('#btnSave').click(function (e) {
            var searchtrm = $('#tbsearchterm').val();
            if (searchtrm == "Enter Search Term" || $.trim(searchtrm) === "") {

                $('#alert-modal-content').modal({ overlayClose: false, close: false, containerId: 'alert-container' });
                $('&lt;b&gt;Whoops!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;span&gt;Before you can save your search you need to enter a search term or query.&lt;/span&gt;').appendTo('#alertTerm');

            }
            else {
                $('#txt_ssQueryText').val(searchtrm);
                $('#save-modal-content').modal({ appendTo: 'form', overlayClose: false, close: false, containerId: 'saveSearch-container' });
            }
        });

    });
}
</code></pre>

<p>As I said this works fine in IE 9 but 8 and lower and the click event is never even touched (verified in debugger). I have seen some other posts which suggest using the .on() event but I have tested this by even using a class selector with no luck. </p>

<p>tried this but it did not work (work meaning the function was never called.</p>

<pre><code>$(function () {
    $('.btntestclass').on('click', 'a', function (e) {
        var searchtrm = $('#tbsearchterm').val();
        if (searchtrm == "Enter Search Term" || $.trim(searchtrm) === "") {

            $('#alert-modal-content').modal({ overlayClose: false, close: false, containerId: 'alert-container' });
            $('&lt;b&gt;Whoops!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;span&gt;Before you can save your search you need to enter a search term or query.&lt;/span&gt;').appendTo('#alertTerm');

        }
        else {
            $('#txt_ssQueryText').val(searchtrm);
            $('#save-modal-content').modal({ appendTo: 'form', overlayClose: false, close: false, containerId: 'saveSearch-container' });
        }
    });

});
</code></pre>

<p>Any suggestions as to why this is not executing in ie 8? </p>

<p>Thanks in advance</p>
