From 6cca5f681871178f6489b12968d88a231e69b4da Mon Sep 17 00:00:00 2001 From: Paul Fournier Date: Thu, 2 Nov 2023 14:34:22 +0100 Subject: [PATCH] put the popup script to a separate file --- www/index.html | 12 ++---------- www/js/popup.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 www/js/popup.js diff --git a/www/index.html b/www/index.html index 592569f..9af9573 100644 --- a/www/index.html +++ b/www/index.html @@ -610,7 +610,6 @@ - @@ -626,16 +625,9 @@ endDate: new Date(2023, 10, 26, 5), groupEventsByLocation: true }); - $('.popup-trigger').click(function(){ - $(this).children($('.popup')).toggleClass("show") - }); - $('.popup-trigger').mouseenter(function(){ - $(this).children($('.popup')).addClass("show") - }); - $('.popup-trigger').mouseleave(function(){ - $(this).children($('.popup')).removeClass("show") - }); }); + + diff --git a/www/js/popup.js b/www/js/popup.js new file mode 100644 index 0000000..4cb085a --- /dev/null +++ b/www/js/popup.js @@ -0,0 +1,11 @@ +$(document).ready(() => { + $('.popup-trigger').click(function(){ + $(this).children($('.popup')).toggleClass("show") + }); + $('.popup-trigger').mouseenter(function(){ + $(this).children($('.popup')).addClass("show") + }); + $('.popup-trigger').mouseleave(function(){ + $(this).children($('.popup')).removeClass("show") + }); +}); \ No newline at end of file