@dmhendricks/jquery-waituntilexists
v1.0.0
Published
jQuery plugin that runs handler function once specified element is inserted into the DOM.
Downloads
14
Maintainers
Readme
jquery.waitUntilExists.js
jQuery plugin that runs handler function once specified element is inserted into the DOM.
Original author: Brandon Belvin
npm install @dmhendricks/jquery-waituntilexists
Usage
<script src="https://cdn.jsdelivr.net/gh/dmhendricks/jquery-waituntilexists/jquery.waitUntilExists.min.js"></script>
$( '#selector' ).waitUntilExists( function() {
// Perform some logic
console.log( $( this ).attr( 'id' ) );
// Optionally remove the listener when finished
$( this ).waitUntilExists( 'remove' );
});