use click instead of set attribute = checked