Skip to content

Commit

Permalink
Added Readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
conquel committed May 28, 2016
1 parent 12745f8 commit 8ea54cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
infotop.html

3 changes: 3 additions & 0 deletions README.md
@@ -0,0 +1,3 @@
# Documentation and demo

[www.infotopjs.com](https://www.infotopjs.com/).
12 changes: 4 additions & 8 deletions demo.html → demo-simple.html
Expand Up @@ -16,16 +16,12 @@

<br>
<br>
<center>
<h1>This is the simplest infotop.js demo. For a complete documentation go to <br><a href="http://www.infotopjs.com">www.infotopjs.com</a></h1>
<br>
<button type="button" onClick="msg();">
<button type="button" onClick="infoTop('Hi there!');">Display message</button>
</center>

<script>

function msg() {
infoTop('Hi there!');
}

</script>

</body>
</html>
11 changes: 8 additions & 3 deletions js/infotop.js
@@ -1,6 +1,6 @@
/**
*
* infotop.js - a tiny, simple and framework-independent library
* infotop.js is a tiny, simple and framework-independent notification library
* designed to display info messages on top of page
*
* By Victor Petrakov
Expand All @@ -21,8 +21,9 @@ var displayDelay = 1000;
var fadeOutDelay = 2000;
var width = "320px";
var maxWidth = "90%";
var border = "1px solid #ffb41e";
var background = "#ffe88d";
var border = "1px solid #FFB41E";
var background = "#FFE88D";
var color = "#000000";
var id = infoTopDefaultTargetId;

if (typeof params !== 'undefined') {
Expand All @@ -47,6 +48,9 @@ if (typeof params !== 'undefined') {
if (typeof params.background !== 'undefined') {
background = params.background;
}
if (typeof params.color !== 'undefined') {
color = params.color;
}
if (typeof params.id !== 'undefined') {
id = params.id;
}
Expand All @@ -65,6 +69,7 @@ infoFrame.style.borderLeft = border;
infoFrame.style.borderRight = border;
infoFrame.style.borderBottom = border;
infoFrame.style.background = background;
infoFrame.style.color = color;
info.style.paddingRight = "15px";

info.innerHTML = content;
Expand Down

0 comments on commit 8ea54cf

Please sign in to comment.