Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update app.js #795

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,31 @@ $(document).ready(function() {
});

// Display a hint (type ie tv, movie or musical) when hovering over the question mark.
$("#emojis").on("mouseover", ".hint-container", function () {
$(this).find(".hint").addClass("hint-reveal");
});
// $("#emojis").on("mouseover", ".hint-container", function () {
// $(this).find(".hint").addClass("hint-reveal");
// });

// // Hide hint (type ie tv, movie or musical) when the user stops hovering over the question mark.
// $("#emojis").on("mouseleave", ".hint-container", function () {
// $(this).find(".hint").removeClass("hint-reveal");
// });

// Hide hint (type ie tv, movie or musical) when the user stops hovering over the question mark.
$("#emojis").on("mouseleave", ".hint-container", function () {
$(this).find(".hint").removeClass("hint-reveal");
});

// Display a hint (type ie tv, movie or musical) when hovering over the question mark.
document.querySelector("#emojis").addEventListener("mouseover", function (event) {
if (event.target && event.target.classList.contains("hint-container")) {
event.target.querySelector(".hint").classList.add("hint-reveal");
}
});

// Hide hint (type ie tv, movie or musical) when the user stops hovering over the question mark.
document.querySelector("#emojis").addEventListener("mouseleave", function (event) {
if (event.target && event.target.classList.contains("hint-container")) {
event.target.querySelector(".hint").classList.remove("hint-reveal");
}
});


// Toggle to expand or hide all of the movie/show names by clicking an icon
$(".btn-reveal-all").click(function () {
$(this).toggleClass(["revealed"]);
Expand Down