I want to reduce the code.
function one() { console.log(\"hai\"); } document.getElementById(\'dealsButton_1\').onclick = one; document.getElementById(\'dealsBu
Are you looking for something like this:
function onClick(){ //single handler } $('[id*="dealsbutton_"]').click(onClick)