@domql/qsql
v0.1.0
Published
DOM manipulation using document queries. Uses [DOMQL](https://github.com/domql/domql) API.
Downloads
4
Readme
qsql
DOM manipulation using document queries. Uses DOMQL API.
Installation
yarn add classql
Examples
Initialization:
import DOM from 'qsql'
DOM.query({
logo: { query: '.logo' }
})
Attributes:
DOM.query({
modal: {
query: '.modal',
style: { display: 'none' }
}
})
Events and update:
DOM.query({
CTA: {
query: '.button',
on: {
click: (event, element, node) => {
DOM.find('modal').update({
style: { display: 'block' }
})
}
}
}
})