Skip to content

symbo-ls/qsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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' }
        })
      }
    }
  }
})

About

Query selector query language

Resources

Stars

Watchers

Forks

Packages

No packages published