From 626bc7720d0893bad17a95eb605ebda8d1429f76 Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 31 Aug 2023 15:12:44 +0100 Subject: [PATCH 1/4] WIP; add appropriate classes and event listeners --- portality/static/js/tourist.js | 8 ++++++++ portality/templates/includes/_tourist_nav.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/portality/static/js/tourist.js b/portality/static/js/tourist.js index cc0f375f0a..1f93579e6b 100644 --- a/portality/static/js/tourist.js +++ b/portality/static/js/tourist.js @@ -15,6 +15,14 @@ doaj.tourist.init = function(params) { if (first) { doaj.tourist.start(first); } + + $(".dropdown--notifications").hoverIntent(doaj.notifications.showDropdown, doaj.notifications.hideDropdown); + doaj.notifications.showDropdown = function(e) { + $("#feature_tours").show(); + } + doaj.notifications.hideDropdown = function() { + $("#feature_tours").hide(); + } } doaj.tourist.findNextTour = function() { diff --git a/portality/templates/includes/_tourist_nav.html b/portality/templates/includes/_tourist_nav.html index f2fa255992..b141f89bbf 100644 --- a/portality/templates/includes/_tourist_nav.html +++ b/portality/templates/includes/_tourist_nav.html @@ -2,7 +2,7 @@ {% set tours = tourservice.activeTours(request.path, current_user) %} {% if tours|length > 0 %} -