Random Content Generator - A jQuery Plugin Featuring Chuck Norris
tagged JavaScript by Jon
Placeholder Text, such as Lorem Ipsum, is something every web designer or developer uses. And for good reason. It’s not meant to confuse clients and provoke comments such as, “what is this funky writing? I can’t read Spanish”. But, to fill in content areas for web design in a way that simulates real written text.
The Problem with Filler Text
I don’t know if ‘problem’ is the right word, maybe ‘annoyance’. Yes, it can be very annoying to look up a random content generator and endlessly copy and paste.
Using Lorem Ipsum, or Greeking, has also been criticized for just being a visual placeholder rather than valuable information. Also, it doesn’t accurately depict the ‘real thing’ and can confuse clients who don’t understand the concept. You can read more about this and join the Just say no to Lorem Ipsum bandwagon here at 37 Signals.
You should also read Mark Boulton’s response to 37 Signal’s article that he assertively titled Design tip: Just say YES to Lorem Ipsum.
So, anyways. . .
Whether you like it or not, I believe filler text is here to stay. To support its survival and remedy some annoyances that I mentioned above, I have created a random content generator using jQuery and, for the sake of entertainment, featuring Chuck Norris (well, actually just facts about him).
This jQuery plugin looks for a designated class name and inserts a random chuck of text from a XML file. You can view the demo page and download the plugin here. If Chuck Norris facts don’t fit your need (I can’t imagine why not), then you can take a minute to customize the XML file. You can even create different categories such as Long Text and Short Text, or Scary Text and Happy Text in the XML and assign the different kinds of content to different classes.
The benefit of this is not having to copy and paste, then remember all the places it needs to be removed after the fact. How many times has Lorem Ipsum slipped into a finished product? If you search the tubes you can find pics of printed material, or ads and even websites that have gone live with filler text still in place. With this plugin, all you have to do is remove it and all filler text is gone. The other purpose I had in mind is to use the randomness part to stress test layouts. Every time you refresh the page, the plugin will randomly insert new text into the placeholders and stretch the layout in all sorts of random ways. This is a good way to find breaking points and such.
I plan to continue developing this. There is a lot more that can be done with it. For example, I would like to integrate the Metadata plugin. If you have any suggestions let me know.
In case you skipped the article and jumped straight to the bottom, here is the link to the demo page where you can also download it.





Leave your mark...
If you liked this article please leave a comment and share it.
Add a comment Digg Stumble Upon Reddit