mopup

Created: 2011-07-12 14:10
Updated: 2013-10-31 16:13

README.md

mopup for jQuery

This plugin shows a random joke taken from the Internet Chuck Norris Database. Not that I like these jokes in particular, but it was the only joke REST API I could find.

Why the name?

The name is a portmonteau from the Dutch words mop (meaning joke) and popup (meaning that annoying thing your browser likes to kill).

Why this plugin?

I was bored and wanted to write a jQuery plugin. This was my first attempt and I used lots of boilerplate code that can be found at the authoring a jQuery plugin page in the jQuery documentation.

Usage

Regular usage is as follows:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="jquery.mopup.js"></script>
<script>
    $(document).mopup();
</script>

However, if you don't like the default look and feel, you can use some options. They are pretty self-explaining. In this example they have their default values.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="jquery.mopup.js"></script>
<script>
    $(document).mopup({
        'backgroundColor': '#333132',
        'color': '#FFF67C',
        'borderTopColor': '#282728',
        'animate': true
    });
</script>
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more