From a0e5d4e22036dba5dd972e67b4b2ff9feeeca590 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Tue, 23 Feb 2021 15:54:25 -0600 Subject: work homework work --- csci4131/hw3/contacts.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'csci4131/hw3/contacts.js') diff --git a/csci4131/hw3/contacts.js b/csci4131/hw3/contacts.js index a8c4b26..af8c84e 100644 --- a/csci4131/hw3/contacts.js +++ b/csci4131/hw3/contacts.js @@ -1,3 +1,5 @@ +document.getElementById("bigboi").classList.add("isntRotating"); + function change(small, row) { document.getElementsByClassName("smol")[row].src = small; } @@ -5,6 +7,15 @@ function lucky() { var image = ["carlson.jpg", "johnston.jpg", "morrill.jpg", "shepherd.jpg", "snyder.jpg", "walter.jpg"]; document.getElementById("bigboi").src = image[Math.floor(6 * Math.random())]; } +let isRotating=0; +function dizzy() { + if (!isRotating) { + document.getElementById("bigboi").classList.remove("isntRotating"); + } else { + document.getElementById("bigboi").classList.add("isntRotating"); + } + isRotating^=1; +} let map; function initMap() { map = new google.maps.Map(document.getElementById("map"), { @@ -53,10 +64,10 @@ function addPoints(locations) { if (!this.infoWindow) { this.infoWindow = new google.maps.InfoWindow({ content: this.data.content, - }); + } this.infoWindow.open(map, this); }) } -} \ No newline at end of file +} -- cgit v1.2.3