Demo
Title text: | |
Content: | |
Is closed: | |
Time to left: | |
Message type: | |
Settings
Callback functions: | |
Show button "close all": | |
Positions: | |
Max. count messages in stack: | |
Animation time: | |
Default hide timeout: | |
Hide messages property: | |
Hide messages property value: | |
Show messages property: | |
Show messages property value: |
Files
istackmessages.js
- main javascript file script.
istackmessages.css
- CSS file message.
Intergrate
Insert this code to HEAD tag of your site:
<script type="text/javascript">
var stackmessages;
window.addEvent('domready', function()
{
stackmessages = new iStackMessages([options]);
});
</script>
Options
capacity
- Maximum count messages in stack.
animationTime
- Show and hide animation duration.
hideTimeout
- Default time to left message.
hideOptions
- Options of hide animation.
property
- name property.
value
- change to value.
showOptions
- Options of show animation.
property
- name property.
value
- change to value.
hPosition
- Set a horizontal position (left or right).
vPosition
- Set a vertical position (top or bottom).
showCallback
- Name callback function to show message.
hideCallback
- Name callback function to close message.
injectBox
- Container which is inserted into the stack, if necessary.
showButtonCloseAll
- Show a button «close all».
Run
Example code
stackmessages.showMessage(type, title, text, closed, hideTimeout, clickFunction);
Parameters
type
- Type of message, example: error, info, success, or your custom.
title
- Title message.
text
- Description message.
closed
- Display close button or no.
hideTimeout
- Custom, if you pass "0" to never hide.
clickFunction
- Custom, a callback function of click to message box.
Misc
iStackMessages developed by Sofcase.
Sofcase homepage.