Generating JavaScript code to arrange elements to be same with specified HTML or element using jQuery Element Diff