Button work multiple selection

dont understand why the js require a click when refresh the page to
activate the function. I ll ask for help.
button work update