delegate html construction to jquery