forked from itscodenation/flw1-portfolio-22-23-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
30 lines (24 loc) · 921 Bytes
/
script.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
const btn = document.querySelector("button"); // Get the button from the page
// Detect clicks on the button
if (btn) {
btn.onclick = function() {
// The JS works in conjunction with the 'dipped' code in style.css
btn.classList.toggle("dipped");
};
}
console.log('stuff')
$('.Ele').click(function(){
$('.imger').attr("src","https://s3-us-west-2.amazonaws.com/schoolmint-chooser-media/oakland/images/606-2.jpg");
$('.cptner').text("My Elementary School");
console.log('stuff1')
});
$('.Middle').click(function(){
$('.imger').attr("src","https://s3-us-west-2.amazonaws.com/schoolmint-chooser-media/oakland/images/642.jpg");
$('.cptner').text("My Middle School");
console.log('stuff2')
});
$('.High').click(function(){
$('.imger').attr("src","https://upload.wikimedia.org/wikipedia/commons/b/b9/Oakland_Technical_High.jpg");
$('.cptner').text("My High School");
console.log('stuff3')
});