itellyou-dom

1.0.2 • Public • Published

document 查询器

安装

npm install itellyou-dom

使用

import $ from 'itellyou-dom'

class Test {
    
    render(){
        const hello = $("<div>hello</div>")
        document.body.append(hello[0])

        // 设置属性
        hello.attr("data-text","hello")
        hello.html("hello world")
        
        // 绑定事件
        hello.on("click",() => {
            hello.append("<p>This is click</p>")
        })
    }
}

const test = new Test()
test.render()

Readme

Keywords

none

Package Sidebar

Install

npm i itellyou-dom

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

38.3 kB

Total Files

7

Last publish

Collaborators

  • aomao