Update layout with js