id="active" logic