HTML and CSS Reference
In-Depth Information
var elem = $("<div>")
.text(text)
.css({float:'left',
margin: "10px 5px",
padding:"15px 5px",
backgroundColor:'#DDD',
width:35,
textAlign:'center',
fontSize: "14px",
cursor:'pointer',
fontFamily: 'Arial',
fontWeight:'bold',
boxShadow: "2px 2px 5px #999",
borderRadius: "5px",
color:"black"})
.appendTo(this.controls);
elem.on('mousedown touchstart',callback);
return elem;
},
select: function(button) {
if(this.selected) {
this.buttons[this.selected].css('backgroundColor','#DDD');
}
this.selected = button;
if(this.buttons[this.selected]) {
this.buttons[this.selected].css('backgroundColor','#FFF');
}
},
move: function() {
this.select('move');
},
paint: function() {
this.select('paint');
},
erase: function() {
this.select('erase');
},
play: function(e) {
if(this.playing) {
this.buttons['play'].text('Play');
Search WWH ::




Custom Search