Converting LJ/DW over to using js rather than html