jQuery Menu (Scope) Hiding on Click
Tags: primo, interface, jquery
Last Updated: Jul 20, 2010 12:29
Problem Statement
Currently when you click the drop down menu for scopes, the menu remains in the drop down state even if you click anywhere on the body of the page. This was against our conventions of web design so we have added a small snippet of code to eradicate this behaviour.
State
Stable
Programming language
jQuery (JavaScript)
Software requirements
Notepad
Screen captures
None needed.
Author(s) homepage
http://www.masudk.com
Download
No need to download any code. The code and instructions are in "Installation instructions" section.
Working example
Not available at the moment as our current test servers are restricted for a certain IP range.
Installation instructions
Add this code to your FE server(s) inside the function setupSearch(). The file to edit would be "fe_web/javascript/v3.js" where fe_web is the shortcut to your "primo_library-libweb.war" directory.
$(document.body).click(function(e){
var scopeList = $('.EXLSearchFieldRibbonFormCollectionsList');
if(!$(e.target).is('.EXLSearchFieldRibbonFormSelectedCollection a'))
{
if (scopeList.is(':visible')){
scopeList.hide();
$('.EXLHeaderSearchLimitsFields').removeClass('EXLTemporarilyHideSelects');
}
}
});
Known issues
None at the moment.