-
Notifications
You must be signed in to change notification settings - Fork 22
/
scripts.js
34 lines (26 loc) · 823 Bytes
/
scripts.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
console.log('script');
$(document).ready(onReady);
function onReady(){
console.log('hello from jquery');
// select #pizzaPrices and remove it
$('#pizzaPrices').remove();
$('ul').children().addClass('boldThis');
let val = $('#pizzeriaName').text();
console.log("this is val: ", val);
$('#pizzeriaName').text(`Casie's Place`);
$('#orderBtn').on('click', function(){
handleClick();
})
$('header').on('click', '#secretBtn', function(){
secretFunction();
})
}
function handleClick(){
console.log('button clicked');
$('#orderBtn').toggleClass('updateOrderBtn');
$('header').append(`<button onClick=" " id="secretBtn">secret button</button>`)
}
function secretFunction(){
alert(`shhhhhhhh hhh sh, it's a secret`);
$('#secretBtn').remove();
}