-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript1.js
More file actions
57 lines (48 loc) · 1.55 KB
/
script1.js
File metadata and controls
57 lines (48 loc) · 1.55 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$(document).ready(function () {
var count = 0;
if (count == 0) {
$target = $('section[data-id="' + 3 + '"]');
$target.addClass('shown');
}
$('.show-section').on('click', function () {
count += 1;
var id = $(this).data('id'),
$target = $('section[data-id="' + id + '"]');
if (id != 4)
$('section').removeClass('shown');
$target.toggleClass('shown');
y = document.getElementById('content');
x = y.style;
// checkBox = document.getElementById('check');
// if (checkBox.checked == true) {
// x.marginLeft = "230px";
// }else{
// x.marginLeft = "60px";
// }
// x.position = "fixed";
// x.marginLeft = "60px";
// x.marginTop = "70px";
y.transition = "0.5s";
if (id == 1) {
x.background = "url(https://img.freepik.com/free-vector/living-room-with-panoramic-window-interior_33099-1728.jpg?size=626&ext=jpg) no-repeat";
}
else
if (id == 2) {
x.background = "url(https://cdn.pixabay.com/photo/2016/06/05/07/59/stars-1436950_1280.jpg) no-repeat";
}
else
if (id == 3) {
x.background = "url(Dashboard.png) no-repeat";
}
else
if (id == 5) {
x.background = "url(https://cdn4.vectorstock.com/i/1000x1000/03/83/gamepad-and-game-console-background-03-vector-27960383.jpg) no-repeat";
}
else
if (id == 6) {
x.background = "url(https://i.pinimg.com/originals/4a/3d/f9/4a3df9a65dd88e74ad568360c78326d4.jpg) no-repeat";
}
x.backgroundSize = "100% 100%";
x.width = "100%";
});
});