Inner-page Messages
createMessage full syntax
You can specify
- the html content of the message (ex after an AJAX call)
- The position of the message (same as align & limit parameters)
- the width of the message
- The classes of the message
- The lifetime of the message : nb of milisecond before it dies if no mouse over him
Except the content all parameters are optionals
- content :"The content of the message", //Can contain any HTML tag
- messageClass: "CSS Classes Of The Message", // if not specified : "margin bkgDarker edit"
- lifetime: Value, //the number of milliseconds befor it dies if no mouse hover (default never dies : null)
- width: "XXXpx", //width given to the message, default 200px
- position: { //Same as align or limit, check there for more information
},
- top: anySelector | "this" | {my:XX, at:XX, offset:XX, selector:anySelector},
- right: anySelector | "this" | {my:XX, at:XX, offset:XX, selector:anySelector},
- bottom: anySelector | "this" | {my:XX, at:XX, offset:XX, selector:anySelector},
- left: anySelector | "this" | {my:XX, at:XX, offset:XX, selector:anySelector}
Messages : Examples
Ex : You want to create a message if you hover an element.
Code
$("#someDiv").hover(Result
Ex : specify the position of the message on the top right corner of the element.
- Default width : rightIsLeftOf the element
- "this" is to specify the element that called the message and will adapt to each calling element
- Otherwise like align or limit : specify any id of the page.
Code
$("#someDiv1, #someDiv2, #someDiv3").hover(Result
Ex : specify the width of the message.
for the position parameters :- Default width : 200px
Code
$("#someDiv").hover(Result
Add messageClass : customize your message.
- Default messageClass : "margin bkgDarker edit"
Code
$("#someDiv").hover(Result
Add a lifeTime to your message: how many milliseconds without mouseover before it dies
- Default value : infinite lifetime
Code
$("#someDiv").hover(Result