Changeset - f8bbe83de0fe
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 8 months ago 2021-10-15 12:11:15
ben@sturm.com.au
Only focus search if search button clicked.
1 file changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/conservancy.js
Show inline comments
...
 
@@ -101,10 +101,12 @@ $(document).ready(function() {
 
        }
 
    }).filter(':checked').trigger('change', 0);
 

	
 
    function toggleMenu(event) {
 
    // Open mobile/search menu.
 
    $('#menu-icon').on('click', function(event) {
 
        $('#navbar').toggleClass('mobile');
 
    });
 
    $('#search-icon').on('click', function(event) {
 
        $('#navbar').toggleClass('mobile');
 
        $('#search-query').focus();
 
    }
 
    $('#menu-icon').on('click', toggleMenu);
 
    $('#search-icon').on('click', toggleMenu);
 
    });
 
});
0 comments (0 inline, 0 general)