cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <h2>JsRender Converters Demo</h2>

<div id="result"></div>

<script id="theTmpl" type="text/x-jsrender">
   <em>Name:</em> {{toUpper:name}}
   {{if showNickname && nickname}}
      (Goes by <em>{{:nickname}}</em>)
   <em>Date of Birth:</em> {{formatDate:dob}}

<hr size="1" noshade color="#F00000">

<div style="font-size: 0.8em;">
<p>If you find this demo useful, please consider <a href="https://www.paypal.me/RobertGravelle/1" target="_blank">donating $1 dollar</a> for a coffee (secure PayPal link) or purchasing one of my songs from <a href="https://ax.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?term=rob%20gravelle" target="_blank">iTunes.com</a> or <a href="http://www.amazon.com/s/ref=ntt_srch_drd_B001ES9TTK?ie=UTF8&field-keywords=Rob%20Gravelle&index=digital-music&search-type=ss" target="_blank">Amazon.com</a> for only 0.99 cents each. I have also released CDs with my band <a href="https://www.cdbaby.com/Artist/IvoryKnight" target="_blank">Ivory Knight</a> and Annihilator main-man Jeff Waters.</p>
<p>Rob uses and recommends <a href="http://www.mochahost.com/2425.html" target="_blank">MochaHost</a>, which provides Web Hosting for as low as $1.95 per month, as well as unlimited emails and disk space!</p>
              var names = [
    "name": "Robert",
    "nickname": ["Blackjacques", "Rob"],
    "showNickname": true,
    "dob": "1969-01-14"
    "name": "Jeanie",
    "nickname": "",
    "showNickname": false,
    "dob": "1968-06-12"

   toUpper: function(val) {
     return val.toUpperCase();
   formatDate: function(val) {
     return (new Date(val)).toLocaleDateString('en-US', {
       day:   'numeric',
       month: 'long',
       year:  'numeric'

var template = $.templates("#theTmpl");

var htmlOutput = template.render(names);


Loading ..................