js before tpl