#Daily Messages
Inspired by Basecamp, Daily Messages is a simple, lightweight jQuery plugin used to display a custom message for each day of the week.
##Instructions
Include jQuery and the plugin in the head or footer of your page.
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/js/plugins/dailyMessages.min.js"></script>
Initialize the plugin targeting the class, ID or element that you want the daily message to be inserted into and send the plugin your custom messages for each day.
$('.daily-message').dailyMessages({
monday: "Case of the Mondays?",
tuesday: "I know it's only Tuesday, but you can do it! ",
wednesday: "Hump day baby!",
thursday: "We all know Thursday is the new Friday.",
friday: "Thank God! We made it. Happy Friday folks!",
saturday: "It's Saturday fool! Stop using the Internets and go outside!",
sunday: "NFL Sunday! Or maybe some Netflix? Chill.",
success: function() {
console.log('It worked!');
},
error: function(message) {
console.log(message);
$(this).remove();
}
});
####Options
-
monday: ""
A string that defines the message that will be displayed on Mondays (default: `null`). -
tuesday: ""
A string that defines the message that will be displayed on Tuesdays (default: `null`). -
wednesday: ""
A string that defines the message that will be displayed on Wednesdays (default: `null`). -
thursday: ""
A string that defines the message that will be displayed on Thursdays (default: `null`). -
friday: ""
A string that defines the message that will be displayed on Fridays (default: `null`). -
saturday: ""
A string that defines the message that will be displayed on Saturdays (default: `null`). -
sunday: ""
A string that defines the message that will be displayed on Sundays (default: `null`). - success: function()
A callback function that runs if Daily Messages is successfull (default: `function()`). - error: function(message)
A callback function that runs if Daily Messages fails (default: `function(message)`).