PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.0.0
Forumax – AI Powered Advanced Community Forum Plugin v2.0.0
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / assets / frontend / js / custom.js

custom.js in Forumax – AI Powered Advanced Community Forum Plugin 2.0.0, at assets/frontend/js/custom.js

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ;(function ($) {
2
3 $(document).ready(function () {
4
5 // Toggle dropdown
6 $('.forumax-sort-lists button').on('click', function (e) {
7 e.stopPropagation(); // prevent document click
8
9 const $currentMenu = $(this).siblings('.dropdown-menu');
10
11 // Close all others
12 $('.forumax-sort-lists .dropdown-menu').not($currentMenu).removeClass('show');
13
14 // Toggle current
15 $currentMenu.toggleClass('show');
16 });
17
18 // Allow clicks inside dropdown (including links)
19 $('.forumax-sort-lists .dropdown-menu').on('click', function (e) {
20 // Only prevent propagation if not clicking a link
21 if (!$(e.target).is('a')) {
22 e.stopPropagation();
23 }
24 });
25
26 // Click outside → close all dropdowns
27 $(document).on('click', function () {
28 $('.forumax-sort-lists .dropdown-menu').removeClass('show');
29 });
30
31 });
32
33 })(jQuery);
34
35