Jquery not working. templates working well