Ryhan Hassan has created a neat little JavaScript library that adds filler content to your HTML mockups. Using it is very simple, just add the fixie.js library to your HTML before the closing </body> tag, and Fixie looks for anything with a class of fixie.

<h1 class="fixie"></h1>
<p class="fixie"></p>

It’s smart enough to fill an <h1> tag with a phrase, a <p> tag with a paragraph, an <img> tag with an image, and so on. If you want to add fixie it to a container, it can handle that too!

By default, all images will be pulled from placehold.it, but changing that is very simple:

fixie.setImagePlaceholder('http://flickholdr.com/${w}/${h}/canon').init();

View the sample (refresh the page a few times to see the content generated dynamically) or browse the source at GitHub.


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.