Using callback to make sure widget html is loaded