min-ready

Simple ready like jQuery(func)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
min-ready
2.3.08 years ago9 years agoMinified + gzip package size for min-ready in KB

Readme

min-ready
!Build statustravis-imagetravis-url !NPM versionnpm-imagenpm-url !Downloadsdownloads-imagedownloads-url !Dependency Statusdavid-imagedavid-url
Simple ready like jQuery(func)

Installation

npm i min-ready

Usage

var ready = require('min-ready')()

ready.queue(function() {
	console.log(1)
})
ready.queue(function() {
	console.log(2)
})
ready.open()
// => 1, 2
ready.queue(function() {
	console.log(3)
})
// => 3

Simple Delay Execute

// before jquery load
var ready = require('min-ready')()

ready.queue(function() {
	var $ = this
	$('.class').html('some thing')
})

ready.queue('ajax', 'http://foo.bar.com', {success: function() {}})
// after jquery load
ready.ctx = $ // set context
ready.open()

License

!Licenselicense-imagelicense-url