$.when( $.ready ).then(function() { $('.color-picker').each( function( i, elem ) { var hueb = new Huebee( elem, { // options }); }); });