You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$j('body').click(function(){ // when 'btnClose' is clicked…
$j.sidr('close', 'sidr'); // close the div with the ID of "sidr"
});
});`
However the above is not closing my menu. I have looked through the site and cannot see anything that would conflict with this. I have also tried this on a parent site which again does not seem to work.
Ideas welcomed please as ideally need to get this working.
Thanks
The text was updated successfully, but these errors were encountered:
// Ensure sidr close on blur.
$(document.body).click(function (e) {
// If a sidr is open.
if ($.sidr('status').opened) {
var isBlur = true;
// If the event is not coming from within the sidr.
if ($(e.target).closest('.sidr').length !== 0) {
isBlur = false;
}
// If the event is not coming from within a trigger.
if ($(e.target).closest('.js-sidr-trigger').length !== 0) {
isBlur = false;
}
// Close sidr is unfocused.
if (isBlur) {
$.sidr('close', $.sidr('status').opened);
}
}
});
I have implemented the following code:
`$j(document).ready(function() {
However the above is not closing my menu. I have looked through the site and cannot see anything that would conflict with this. I have also tried this on a parent site which again does not seem to work.
Ideas welcomed please as ideally need to get this working.
Thanks
The text was updated successfully, but these errors were encountered: