I would actually prefer to handle this in the jinja template and not using JS.