Giter Club home page Giter Club logo

daily-messages's Introduction

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

daily-messages's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.