This repository has been archived by the owner on Oct 9, 2021. It is now read-only.
forked from Douglaspjames/phase-0-tracks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from elshaek/9.3
9.3
- Loading branch information
Showing
4 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,46 @@ | ||
console.log("The script is running!"); | ||
|
||
/* | ||
function addPinkBorder(event) { | ||
console.log("click happened! here's the click event:"); | ||
console.log(event); | ||
event.target.style.border = "2px solid pink"; | ||
} | ||
function removePinkBorder(event) { | ||
event.target.style.border = null; | ||
} | ||
var photo = document.getElementById("lizard-photo"); | ||
photo.addEventListener("click", addPinkBorder); | ||
photo.addEventListener("mouseover", addPinkBorder); | ||
photo.addEventListener("mouseleave", removePinkBorder | ||
*/ | ||
|
||
$("#lizard-photo").on({ | ||
mouseenter: function(){ | ||
$(this).css("border", "2px solid pink"); | ||
}, | ||
mouseleave: function(){ | ||
$(this).css("border", 0); | ||
}, | ||
click: function(){ | ||
$(this).animate({ | ||
width: "500px", | ||
margin: "80px" | ||
}) | ||
.animate({ | ||
width: "225px", | ||
margin: "0px" | ||
}); | ||
}, | ||
}); | ||
|
||
$("#toggle-buttons").click(function(){ | ||
$("button").fadeToggle("fast"); | ||
}); | ||
|
||
|
||
|
||
$(".hide").click(function(){ | ||
$("#lizard-photo").hide("slow"); | ||
}); | ||
|
||
$(".reveal").click(function(){ | ||
$("#lizard-photo").show("fast"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#lizard-photo { | ||
width: 225px; | ||
height: auto; | ||
} | ||
|
||
#toggle-buttons { | ||
color: white; | ||
background: maroon; | ||
width: 150px; | ||
padding: 10px 50px; | ||
} |