I want to register onclick event for a button. Please help
odoo.define('test.payment_checkout', require => {
'use strict';
const core = require('web.core');
const Dialog = require('web.Dialog');
const _t = core._t;
console.log('test.payment_checkout');
return {
start: function () {
$('#test').click(function () {
console.log("TEST")
});
},
}
})
The file is loaded because I can see the console.log in browser's console. But the button didn't do anything