August 13, 2009
Tags: jQuery
This is a small piece of code that is mostly the brain child of the incredible David Walsh. His version is written in MooTools and you can see it here. There are a few differences however, I removed some of the basic form validation, I set up a Gravatar function to be called onBlur rather then keyUp because the flashing Gravatar on each key stroke just got really annoying. While I prefer MooTools I did this in jQuery because:
- David Walsh already did an excellent MooTools version.
- Depending on its popularity I might make this into a Wordpress plugin. And since most themes and Wordpress are already using jQuery I figured that was the largest market.
- Some of his commenters were requesting a jQuery version.
Demo and Download
You can see it in action here.
Download a zip here.
August 6, 2009
Tags: Classes, Extensions, jQuery, MooTools, Plugins
Hopefully the plug-ins and classes I write are simple enough to figure out and manipulate. Its an extremely simple and customizable little testimonial rotator that also supports HTML. So yes your quotes can have links, logos or even avatars. It will support as many quotes or testimonials you may need. The options that can be set are speed (number), json (JSON file URL), and what quote you want to start from (number).
If you have any feature requests, questions, or issues please drop me a comment and I would love to help you out. Here are the details and usage for each of the particular frameworks.
jQuery
$('#container').quotator();
MooTools
var myQuotes = new Quotator('container');
The JSON
By default it looks for a file called quotes.js which is a simple JSON file that looks something like this:
{"quotes":
[{
"quote" : "Quote 1",
"author" : "Author 1"
},{
"quote" : "Quote 2",
"author" : "Author 2"
}]}
Demo and Download
You can see it in action here.
Download a zip for jQuery here.
Download a zip for MooTools here.