Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>IF you wish to simply add an event handler to the object in question:</p> <pre><code>$('#base').click(function () { alert('Click Fired'); }).fadeIn('slow', function () { document.onkeydown = docOnKeydown; }); </code></pre> <p>trigger the click event after the fadein?</p> <pre><code>$('#base').fadeIn('slow', function () { document.onkeydown = docOnKeydown; $(this).trigger('click'); }); </code></pre> <p>trigger click I(potentially while fadein)</p> <pre><code>$('#base').fadeIn('slow', function () { document.onkeydown = docOnKeydown; }).trigger('click'); </code></pre> <p>EDIT: Just and the handler when the rest is added</p> <pre><code>$(document).on('click','#base',function () { alert('Click Fired'); }); $('#form').submit(function (ev) { ev.preventDefault(); $('#wrapper').html(html).scrollTop(0); $('#base').fadeIn('slow', function () { document.onkeydown = docOnKeydown; }); return false; }); </code></pre> <p>better: for the handler if the base has a container. tag to that as more "local" than the document for performance reasons.</p> <pre><code>$('#basecontainer').on('click','#base',function () { alert('Click Fired'); }); </code></pre> <p>EDIT BASED ON COMMENT:, "it exists already" this should also work and be simpler on the DOM:</p> <pre><code>$('#base').click(function () { alert('Click Fired'); }); $('#form').submit(function (ev) { ev.preventDefault(); $('#wrapper').html(html).scrollTop(0); $('#base').fadeIn('slow', function () { document.onkeydown = docOnKeydown; }); return false; }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload