title: asp.net jquery fancybox -> Triggering a button click event via jquery in the fancybox onClose event
body: <p>I am attempting to click a button when the onClose event occurs for fancybox.
  I am thinking that I just have a syntax issue, but I am not completely sure.  Here is my code. :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          var $_returnvalue = false;
  
          $(document).ready(function () {
  
              $(".stopNumberLnkItem").fancybox({
                  'width': '85%',
                  'height': '85%',
                  'autoScale': false,
                  'transitionIn': 'elastic',
                  'transitionOut': 'elastic',
                  'speedIn': 400,
                  'speedOut': 400,
                  'type': 'iframe',
                  'showCloseButton': true,
                  'onClosed': function () {
                      if ($_returnvalue = 'Y') {
                          $('#Chkbxaddto').attr('checked', 'checked');
                      }
                      $(".gridStopSelectorListLnkItem").trigger('click');
                  }
              });
          });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>Here is my linkbutton that I am attempting to click via the trigger('click') above. :</p>
  
  <pre><code>&lt;asp:LinkButton runat="Server" ID="RefreshGridStopListButton" Text="Refresh Grid Stop List" CssClass="gridStopSelectorListLnkItem"
                            OnClick="RefreshGridStopListButton_Click" Font-Size="smaller" Visible="true"/&gt;
  </code></pre>
  
  <p>I have been trying different selectors and different ways of performing the click but to no avail.  I have stepped through with IE developer tools but it does not seem to be clicking that button.  Any thoughts on this one would be greatly appreciated.</p>
  
  <p>Thanks.</p>