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

@onaug6th/load-bar

v1.0.6

Published

a funny, powerful and beautiful jquery plugins

Downloads

2

Readme

loadBar

npm (scoped)

一个漂亮,~~强大~~的进度条插件。监听http请求的状态,并且直观的展示Http请求进度。

简体中文 | English

Docs/演示文档

启动

npm run dev

构建生产

npm run build

使用

使用 npm:

npm i @onaug6th/load-bar

使用script标签:

<script src="/dist/loadBar.min.js"></script>

例子

页面中先引入jquery,然后再引入loadBar.min.js。

$("body").loadBar();

var options = {...}
$("#other").loadBar(options);

options 配置

var opt = {
    displayOnRequest: false,
    height: 200,
    endLoad: function(){
        //  do sth
    }
}
$("body").loadBar(opt);

| 名称 | 说明 | 类型 | 默认值 | | - | - | - | - | | displayOnRequest | 是否在请求中展示 | Boolean | true | | background | 进度条背景色 | String | #29d | | img | 是否使用图片 | String | | | height | 进度条高度 | Number, String | 2px | | all | 任何事件都会触发 | Function | noop | | startLoad | 进度条出现前触发 | Function | noop | | endLoad | 进度条消失后触发 | Function | noop | | mounted | 进度条挂载后触发 | Function | noop |

事件

$("body").on("startLoad", function(){
    //  do sth
})

| 名称 | 说明 | 类型 | | - | - | - | | all | 任何事件都会触发 | Function | | startLoad | 进度条出现前触发 | Function | | endLoad | 进度条消失后触发 | Function | | mounted | 进度条挂载后触发 | Function |

方法

$("body").loadBar("start");
//  or
$("body").loadBar("getOpt", "img");
//  or
$("body").loadBar("setOpt", "img", yourPath);

| 名称 | 说明 | 参数 | | - | - | - | | start | 进度条开始 | | | end | 进度条结束 | | | setOpt | 设置进度条配置属性 | attrName: String Object, value: String | | getOpt | 获取配置属性 | attrName: String | | destroy | 摧毁进度条 | | | sayName | 打招呼 | name:string |

License

MIT

have a nide day