complete JS of adding the clicking event modify btn