Skip to content

Commit

Permalink
Prevent defaulted on More
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelmdLow committed Aug 17, 2023
1 parent 634873d commit a3a6cab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion navigation/templates/navigation/headers/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ul class="sections">
{% main_menu %}
<li class="dropdown">
<a class="more-dropdown" href="#">MORE <i class="dropdown-hidden fa-solid fa-caret-down"></i><i class="dropdown-show fa-solid fa-caret-up"></i></a>
<a class="more-dropdown preventDefault" href="#">MORE <i class="dropdown-hidden fa-solid fa-caret-down"></i><i class="dropdown-show fa-solid fa-caret-up"></i></a>
<div class="more-list dropdown-content">
<ul>
{% flat_menu 'dropdown_menu' max_levels=1 show_menu_heading=False fall_back_to_default_site_menus=True %}
Expand Down
10 changes: 9 additions & 1 deletion ubyssey/static_src/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import upcomingEvents from './widgets/upcoming-events';
initializeSearchFormActions();
initializeSocialMediaActions();

initializeAudioQuote()
initializePreventDefault();

initializeAudioQuote();

initializeFilterDropdown();

Expand Down Expand Up @@ -286,6 +288,12 @@ function initializeSocialMediaActions() {

}

function initializePreventDefault() {
$('.preventDefault').click(function (e) {
e.preventDefault();
});
}

function initializeAudioQuote() {
$(document).on('click', 'a.playAudioQuote', function (e) {
e.preventDefault();
Expand Down

0 comments on commit a3a6cab

Please sign in to comment.