Fixie.js - Dynamically generated filler content

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 &lt;h1&gt; tag with a phrase, a &lt;p&gt; tag with a paragraph, an &lt;img&gt; 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.

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

Beyond Code: Season 3 / GopherCon 2015

 
0:00 / 0:00