Trying to see if the Jquery promise api can solve my DOM probs