-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuttonJS.js
84 lines (59 loc) · 2.72 KB
/
buttonJS.js
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
function onClick(element) {
document.getElementById("img01").src = element.src;
document.getElementById("modal01").style.display = "block";
var captionText = document.getElementById("caption");
captionText.innerHTML = element.alt;
}
// Toggle between showing and hiding the sidebar when clicking the menu icon
var mySidebar = document.getElementById("mySidebar");
function w3_open() {
if (mySidebar.style.display === 'block') {
mySidebar.style.display = 'none';
} else {
mySidebar.style.display = 'block';
}
}
// Robot
function robotLink() {
window.open("https://jinlibot7.github.io/RobotSimulatorWithLoader/")
}
function buttonHoverRobot(){
document.getElementById('robotArmImg').src="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/robot.gif"
}
function buttonHoverRobotOff(){
document.getElementById('robotArmImg').src ="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/robotCover.png"
}
// Projectile
function projectileLink() {
window.open("https://jinlibot7.github.io/ProjectileMotion/")
}
function buttonHoverProjectile(){
document.getElementById('projectileImg').src="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/projectile.gif"
}
function buttonHoverProjectileOff(){
document.getElementById('projectileImg').src ="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/projectileCover.png"
}
// Spring
function springLink() {
window.open("https://jinlibot7.github.io/massSpringDamper/")
}
function buttonHoverSpring(){
document.getElementById('springImg').src="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/spring.gif"
}
function buttonHoverSpringOff(){
document.getElementById('springImg').src ="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/springCover.png "
}
// Cartpole
function cartpoleLink() {
window.open("https://jinlibot7.github.io/CartPole/")
}
function buttonHoverCartpole(){
document.getElementById('cartpoleImg').src="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/cartpole.gif"
}
function buttonHoverCartpoleOff(){
document.getElementById('cartpoleImg').src ="https://raw.githubusercontent.com/JinliBot7/PolyUVirtualLabPortfolio/main/src/images/cartpoleCover.png"
}
// CatControl
function catControlLink() {
window.open("https://samanthalhy.github.io/catControl/")
}