ripple-core
Version:
Ripple is an interactive audience response system that allows presenters to survey audience members in real time communication through their mobile devices.
20 lines (18 loc) • 557 B
JavaScript
$(document).ready(function(){
var NOTIFY = new NotifyController();
// Send Role Change to server
$('#permissions input[type="checkbox"]').click(function(){
var that = $(this)
, objID = $(this).attr("id")
, role = $(this).attr("data-role")
, data = ""
, action = "";
// Data
if( $(this).attr("checked") ) action = "add";
else action = "remove";
data = 'objid=' + objID + '&role=' + role + '&action=' + action;
// Post and Notify
NOTIFY.postData(document.URL, data).complete(function(){
});
});
});