Watch 1 Star 1 Fork 0

lifankohome / tip-jsHTMLMIT

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
A javascript function to show a pretty tip message on browser spread retract

https://www.lifanko.cn/tipjs/

Clone or download
Loading...
README.md

tip-js

A javascript function to show a pretty tip message on browser

tip.min.js - ECMASCRIPT5

How to use?

  • Link the tip.js/tip.min.js file

  • Use tip(...) function at script

You may have a look at demo.html if you are really confused.

CDN:

http://cdn.lifanko.cn/tip10.min.js

Parameter:

tip(text, top, period, index, side)

Required parameters:

text  : (String) The text you want to show
top   : (String) Margin top attribute of text
period: (int) Time to display

Optional parameters:

index : (String) z-index attribute of text
side  : (boolean) To show on Left or right

Comprehensive example:

tip("I will display on right and margin-top 30% for 2000ms with z-index 1", "30%", 2000, "1", true);

Special situation:

You may call 'tip' function when a tip text is showing, what would happen under this circumstances?

  • The later caller will cancel the earlier caller, so the showing text will hide immediately, then the latest 'tip' will show.

Comments ( 0 )

Sign in for post a comment

HTML
1
https://gitee.com/lifanko/tip-js.git
git@gitee.com:lifanko/tip-js.git
lifanko
tip-js
tip-js
master

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542