npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@whitesev/domutils

v1.4.0

Published

使用js重新对jQuery的部分函数进行了仿写

Downloads

923

Readme

版本

  • 最新版本:npm version

使用

npm install @whitesev/domutils
// 或者
nnpm add @whitesev/domutils

使用js重新对jQuery的部分函数进行了仿写

  • addClass 给元素添加class
  • after 在元素后面添加兄弟元素或HTML字符串
  • animate 在一定时间内改变元素的样式属性,实现动画效果
  • append 函数在元素内部末尾添加子元素或HTML字符串
  • attr 获取或设置元素的属性值
  • before 在元素前面添加兄弟元素或HTML字符串
  • blur 绑定或触发元素的blur事件
  • click 绑定或触发元素的click事件
  • css 获取或设置元素的样式属性值
  • delegate 为指定元素的子元素绑定事件
  • empty 移除元素的所有子元素
  • fadeIn 淡入元素
  • fadeOut 淡出元素
  • focus 绑定或触发元素的focus事件
  • height 获取元素的高度
  • hide 隐藏元素
  • hover 当鼠标移入或移出元素时触发事件
  • html 获取或设置元素的HTML内容
  • keydown 当按键按下时触发事件
  • keyup 当按键松开时触发事件
  • next 获取当前元素的后一个兄弟元素
  • off 取消绑定事件
  • offset 设置或返回被选元素相对于文档的偏移坐标
  • on 绑定事件
  • outerHeight 获取元素的外部高度(包括边框和外边距)
  • outerWidth 获取元素的外部宽度(包括边框和外边距)
  • parent 获取当前元素的父元素
  • prepend 函数 在元素内部开头添加子元素或HTML字符串
  • prev 获取当前元素的前一个兄弟元素
  • prop 获取或设置元素的属性值
  • ready 等待文档加载完成后执行指定的函数
  • remove 移除元素
  • removeAttr 移除元素的属性
  • removeProp 移除元素的属性
  • show 显示元素
  • siblings 获取当前元素的所有兄弟元素
  • text 获取或设置元素的文本内容
  • toggle 切换元素的显示和隐藏状态
  • trigger 主动触发事件
  • val 获取或设置元素的value属性值
  • width 获取元素的宽度
  • wrap 将一个元素包裹在指定的HTML元素中

具体注释在代码中查看