-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwordsnake_stuff.js
More file actions
29 lines (22 loc) · 840 Bytes
/
wordsnake_stuff.js
File metadata and controls
29 lines (22 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(function(){
$('.class').css('float','left');
$('.answer').after("<div style='clear:both'></div>");
$('.class').css({border: '2px dashed grey', padding: '10px', margin: '10px 20px', width: '350px'});
$(".answer").hide();
$(".answer").before(
function(){
var h = $(this).height();
var w = $(this).width();
var D = $("<div class='hider' style='float:left; margin:10px; font-size:2em;" +
"padding:10;border:1px solid black'>answer</div>");
D.css({'height':h, 'width':w});
return D;
});
$(".hider").click(function() {
$(this).slideUp();
$(this).next('.answer').slideToggle();
});
$(".censored").click( function() {
$(this).toggleClass("censored");
});
});