library jquery-waituntilexists
jQuery plugin that runs handler function once specified element is inserted into the DOM.
dmhendricks/jquery-waituntilexists
jQuery plugin that runs handler function once specified element is inserted into the DOM.
- Sunday, August 27, 2017
- by dmhendricks
- Repository
- 1 Watchers
- 0 Stars
- 2 Installations
- JavaScript
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
, (*1)
jquery.waitUntilExists.js
jQuery plugin that runs handler function once specified element is inserted into the DOM., (*2)
Original author: Brandon Belvin, (*3)
npm install @dmhendricks/jquery-waituntilexists
Usage
<script src="https://cdn.jsdelivr.net/npm/@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' );
});
, (*4)