Skip to content

A javascript function to show a pretty tip message on browser

License

Notifications You must be signed in to change notification settings

lifankohome/tip-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A javascript function to show a pretty tip message on browser

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published