Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$(document).ready(function () {
// Initialize variables
drawer = new mdc.drawer.MDCPersistentDrawer(document.querySelector('#main-drawer'));
refreshIntervalTextfield = new mdc.textField.MDCTextField(document.querySelector('#refresh-interval-tf-div'));
// Register event listeners
$('.idcc-toolbar-menu').on('click', function () {
drawer.open = !drawer.open;
});
const activatedClass = 'mdc-list-item--selected';
$('.mdc-drawer__drawer').on('click', function (event) {
var target = event.target;
while (target && !$(target).hasClass('mdc-list-item')) {
target = target.parentElement;
}
if (target) {
$('.' + activatedClass).removeClass(activatedClass);
$(event.target).addClass(activatedClass);