update button click loading. note that jquery in js may not be necessary, because we ensure the process