jquery.waitUntilExists.js
jQuery plugin that runs handler function once specified element is inserted into the DOM.
Forked from: https://gist.github.com/PizzaBrandon/5709010
bower install jq.waituntilexists --save
Usage
$( '#selector' ).waitUntilExists( function() {
// Do some magic
console.log( this.id );
});