n
n
nexo
Search…
DOM Event handler

n.on(object, event, function);

Get object from id:
n.on(n.id('button'), 'click', () => {
console.log("Hi button!!")
})
Get object from id width string:
n.on('#button', 'click', () => {
console.log("Hi button!!")
})

n.on(class, event, function);

Get group objects from class:
n.on(n.class('buttons'), 'click', () => {
console.log("Hi buttons class!!")
})
Get object from id width string:
n.on('.buttons', 'click', () => {
console.log("Hi buttons class!!")
})
Copy link
On this page
n.on(object, event, function);
n.on(class, event, function);