Fetching contributors…
Cannot retrieve contributors at this time
24 lines (23 sloc) 735 Bytes
<link rel="stylesheet" type="text/css" href="/static/simple/assets/simple.css"/>
<script type="text/javascript">
// Changes background color of the header.
// Note: JavaScript code should not be hard coded into the view template. It's done
// here to simplify the code example.
function setColor(id, color) {
document.getElementById(id).style.backgroundColor = color;
<div id="{{mojit_view_id}}" class="mojit">
<h2 id="header">{{title}}</h2>
<ul class="toolbar">
<li><a href="#" onClick="setColor('header','{{rgb}}');">{{id}}</a></li>