Skip to content
/ tub.js Public

简易弹窗/信息提示 JavaScript Alert/Notification System

Notifications You must be signed in to change notification settings

LeeJim/tub.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tub.js

简易弹窗/信息提示(不依赖jQuery) JavaScript Alert/Notification System without jQuery

demo戳我

  • alert方法 (最常用)
	tub.alert('正在加油中')({
			timeout : 4000
	});
  • confirm方法
	tub.confirm({
		title:'感谢信',
		content: '谢谢你使用tub.js',
		btn:['哈哈','加油']
	})(function() {
		console.log('感谢你');
	})
  • prompt方法
	tub.prompt({
		title:'感谢信',
		content: '谢谢你使用tub.js',
		btn:['哈哈','加油']
	})(function(value, input) {
		console.log(value);
		input.value = '';
	})

2016/1/15更新

  • tips方法
	tub.tips({
		content:'lalalalallala', //tips的内容 @string 
		from:'target0', //绑定的对象 [id/DOM] @string / @DOMElement
		method: 'hover', //绑定的方法 ['click'/'hover'] @string
		position: 'top', //绑定元素的位置 ['top'/'right'/'bottom'/'left'] @string
		color:'blue' //显示的颜色 ['blue'/'#123456'/'rgb(0,1,2)'] @string
	})

其他方法陆续开发中。。。

About

简易弹窗/信息提示 JavaScript Alert/Notification System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages