CSS
@charset "utf-8";
/* CSS Document */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
@charset "utf-8";
/* CSS Document */
body{
background-color:#eee;
}
#wrapper{
width:960px;
margin:auto;
margin-bottom:15px;
background-color:#FFF;
font-family:Tahoma, Geneva, sans-serif;
box-shadow: 0px 2px 8px rgba(0,0,0,0.7);
}
#instructions{
margin:20px 0px 10px 0px;
}
#activity{
margin:10px 20px 20px 20px;
}
p.title{
padding:15px 20px 5px 20px;
font-size:30px;
font-weight:bold;
}
.bold{
font-weight:bold;
}
p.subtitle{
padding:5px 20px;
line-height:1.3em;
}
#poolholder{
clear:both;
background-color:#eee;
width:920px;
}
ul#pool{
padding:10px;
min-height:100px;
}
ul#pool...
JavaScript
// JavaScript Document
var totalmovers
var pool=['<li id="mover1">Challenge the status quo</li>','<li id="mover2">Take risks</li>','<li id="mover3">Questioning</li>','<li id="mover4">Experimenting</li>','<li id="mover5">Networking</li>','<li id="mover6">Observing</li>','<li id="mover7">Associational Thinking</li>','<li id="mover8">Innovative<br> Business idea</li>','<li id="mover9">Bogus1</li>','<li id="mover10">Bogus2</li>'];
//standard .ready(init) function - allows all pages to load before scripts can take effect
$(document).ready(init);
//init function
function init(){
pool.shuffle();
for(var x=0; x<10; x++){
$('#pool').append(pool[x]);
}
totalmovers = $('ul#pool li').size();
$('#pool').sortable({
connectWith: ".takercontent",
placeholder: "tempstate",
forcePlaceholderSize:true
})
$('.takercontent').sortable({
connectWith: "#pool, .takercontent",
placeholder: "tempstate",
forcePlaceholderSize:true,
receive: function(event, ui) {
if ($(this).children().length > 1) {
$(ui.sender).sortable('cancel');
}
}
})
$('#validate').bind('click', validateactivity);
$('#seeanswer').bind('click', showanswers);
}
function validateactivity(){
for(var x=1; x<=totalmovers; x++){
if($('#mover'+x).parent().hasClass("takercontent"+x)){
$('#mover'+x).parent().css('border','2px solid #0F0'); //green
} else {
$('#mover'+x).parent().css('border','2px solid #F00');
}
}
}
function showanswers(){
$('.takercontent').css('border','2px solid #0F0');
for(var x=1; x<=totalmovers; x++){
$('#mover'+x).appendTo("#takercontent"+x);
}
}
Array.prototype.shuffle = function() {
var i = this.length, j, tempi, tempj;
if ( i == 0 ) return false;
while ( --i ) {
j = Math.floor( Math.random() * ( i + 1 ) );
tempi = this[i];
tempj = this[j];
this[i] = tempj;
this[j] = tempi;
}
return this;
}