- Overview
- Documents
tinyNotice is a jQuery Notification Plugin for tiny notifications with simple configuratio
sex shop sex shop sex shop sex shop sex shop seks shop spanish fly psikolog sohbet numara sohbet hatti
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="tinyNotice/FlatTheme.css"> <script src="scripts/jquery-1.11.1.min.js"></script> <script src="tinyNotice/tinyNotice.js"></script>
2. JAVASCRIPT
Inline conifg and using use for fast notice.the below codes show all inline otions;
$(function () {
$.tinyNotice( ["statusTitle"] ,"statusText",["status"],[lifeTime]);
});
option description:
"statusTitle" : title of notice / type:string / default = ""
"statusText" : notice text / type:string / default = ""
"status" : use One of status [note,warning,success,error,info] / type:string / default = "note"
lifeTime : time of life (ms) / type:number / default = 4000
examples :
//show this text with default config [statusTitle:"",lifeTime:4000,status:note]
$.tinyNotice("this is a satatus text without status title");
//show this text with default config for lifeTime and status
$.tinyNotice("notice title","this is a satatus text ");
//show this text in warning view
$.tinyNotice("this is a satatus text without status title" , "warning");
//show this text with full custom config
$.tinyNotice("notice title","this is a satatus text " , "warning" , 6000);
optional [json object] conifg and using
$(function () {
$.tinyNotice({options});
});
default options is :
{
statusTitle : "",
statusText : "",
status : "note",
lifeTime : 4000,
setConfirm : false,//hide buttons and show close button on top-left of box to close
accept : function(){ //run when click accept button },
cancel :function(){ //run when click cancel button }
callback:function(){ //run when close or expiration lifeTime}
}
to set option.setConfirm you can use 2 options:
boolean : when use "true" show buttons by default topics .default is "false" and buttons are hidden.
array : for exampel => ["ok","no,tanks"] //change topics of accept and cancel buttons.
examples :
//show info custom text in info view
$.tinyNotice({
status : "info",
statusTitle : "info",
statusText : "this is a info message!"
});
//set a confirm. note : lifeTime don't use in confirm mod (close box button is hidden too)
$.tinyNotice({
setConfirm:["ok,i'm ready","no,tanks"], //to use default botton topic writing true
statusTitle : "Confirm mod",
statusText : "custom button topic!"
accept: function(){
alert("ok");//run when user click on "ok,i'm ready" button
},
cancel: function(){
alert("cancel");//run when user click on "no,tanks" button
}
});
3. DESTROY
destroy tinyNotice [use for unlimited lifeTime or its expiration lifeTime has not yet].
$.tinyNotice("destroy"); //remove tinyNotice
JS Tutorial

