This time I will share jQuery Plugin and tutorial about jQuery Plugin To Display Daily Predefined Messages – Daily Messages, hope it will help you in programming stack.
Daily Messages is a jQuery plugin that automatically displays a daily predefined message based on the day of the week.
How to use it:
1. Put the jQuery daily messages plugin after jQuery JavaScript library like this:
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "src/dailyMessages.js" ></ script > |
2. Create a container element where you want to place the messages.
1 |
< div class = "daily-message" ></ div > |
3. Call the function and define the different messages for each day of the week.
1 |
$( '.daily-message' ).dailyMessages({ |
2 |
monday: "Get Motivated" , |
3 |
tuesday: "Get Down to Business" , |
4 |
wednesday: "Keep it Going" , |
5 |
thursday: "Reflect on All You've Done" , |
6 |
friday: "Conquer Your Fears" , |
7 |
saturday: "Prep for Success" , |
8 |
sunday: "Prep for Success" |
4. Callback functions.
1 |
$( '.daily-message' ).dailyMessages({ |
3 |
console.log( 'It worked!' ); |
5 |
error: function (message) { |
This awesome jQuery plugin is developed by michael-lynch. For more Advanced Usages, please check the demo page or visit the official website.