android h5 toast,GitHub - jadjoubran/Android-Toast: An HTML5 replication of the Native Android Toast...

Android-Toast

Compatible with PhoneGap applications.

To use Android toast, simply include src/css/toast.css and src/js/toast.js to your project and call the android_toast javascript function (does not require jQuery or any external DOM manipulation library)

var toast1 = new Android_Toast({content: 'Please check your connection and try again.'});

You can also customize the position and the duration:

var toast2 = new Android_Toast({content: 'Connected to Wi-Fi network Router Name', duration: 4000, position: 'top'});

Installation

Package is available through bower:

bower install android-toast

Or you can simply include the dist/android_toast.min.js and dist/android_toast.min.css files in your document.

JavaScript API

The constructor function accepts 3 options:

content sets the text to be displayed. text will be highlighted in blue.

duration accepts an integer. The toast will disappear after the set duration. Defaults to 3000 (milliseconds).

position Either top or bottom. Determines the position of the toast. Defaults to bottom.

License

Check the MIT-LICENSE.txt file

Contributors

http://www.eTobb.com 's first Open Source contribution.

Developed by Jad Joubran @JoubranJad

Other contributors:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值