Check marks work in javascript