replace onclick() with click() event