-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript main.js
More file actions
36 lines (36 loc) · 942 Bytes
/
javascript main.js
File metadata and controls
36 lines (36 loc) · 942 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
30
31
32
33
34
35
36
alert('Landscape mode is recommended for mobile users.');
function update()
{
$("iframe").contents().find("html").html(
"<html><head><style type='text/css'>"+$('#writecss').val()+"</style></head>"+
"<body>"+$("#writehtml").val()+"</body></html>");
document.getElementById('writeoutput').contentWindow.eval($('#writejs').val());
}
$(".press").hover(function()
{
$(this).addClass("high");
},
function()
{
$(this).removeClass("high");
}
)
$(".press").click(function()
{
$(this).toggleClass("initial");
$(this).removeClass("high");
var x=$(this).attr("id");
x='write'+x;
$('#'+x).toggleClass('hide');
var ishide = 4-$('.hide').length;
$('.hey').width((($(window).width())/ishide)-10);
}
)
$('#dabody').width(($(window).width()));
$('#dabody').height(($(window).height())-$('#top-panel').height()-10);
update();
$("textarea").on('change keyup paste',function()
{
update();
}
);