Skip to content
A simple, lightweight jQuery plugin used to display a custom message for each day of the week.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
demo
src
LICENSE.md
README.md
bower.json
dailyMessages.jquery.json

README.md

#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.

See a demo

##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

  1. monday: ""
    A string that defines the message that will be displayed on Mondays (default: `null`).
  2. tuesday: ""
    A string that defines the message that will be displayed on Tuesdays (default: `null`).
  3. wednesday: ""
    A string that defines the message that will be displayed on Wednesdays (default: `null`).
  4. thursday: ""
    A string that defines the message that will be displayed on Thursdays (default: `null`).
  5. friday: ""
    A string that defines the message that will be displayed on Fridays (default: `null`).
  6. saturday: ""
    A string that defines the message that will be displayed on Saturdays (default: `null`).
  7. sunday: ""
    A string that defines the message that will be displayed on Sundays (default: `null`).
  8. success: function()
    A callback function that runs if Daily Messages is successfull (default: `function()`).
  9. error: function(message)
    A callback function that runs if Daily Messages fails (default: `function(message)`).
You can’t perform that action at this time.