Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (26 sloc) 909 Bytes
<?xml version="1.0" encoding="utf-8"?>
<ModulePrefs title="Caja Sample"
description="Displays a simple content section to cajole"
author="Jonathan LeBlanc">
<Require feature="opensocial-0.9"/>
<Require feature="caja" />
<Content type="html">
<div id="number">0</div>
<button onclick="changeNum('+')">+</button>
<button onclick="changeNum('-')">-</button>
<script type="text/javascript">
//increment or decrement the counter
function changeNum(changeType){
var num = document.getElementById("number");
num.innerHTML = (changeType == "+") ?
parseInt(num.innerHTML) + 1 :
parseInt(num.innerHTML) - 1;