issue with portal Hamburg menu hover

Yasin Shaik11
Tera Contributor

 

@jaheerhattiwale 

Hi Jaheer,

Good AfterNoon. 🙂

Whatever we have created Hamburg menu is working fine that means whenever user hover on the Hamburg menu it will show the list of items that is Okay. But when the user hover out(that means remove the cursor from the Hamburg menu) immediately it has to be remove the Hamburg menu items. Like for example if you can see the attachment the mouse cursor not present on the Hamburg menu even though the hover is working. Here we would like to work this operation when the hover takes place on the Hamburg menu.

What are the modifications are required in UI script as given below. Please do needful.

UI script:

$(document).ready(function() {
setTimeout(function() {
$("#sp-nav-bar ul li a").first().mouseover(function() {
$("#sp-nav-bar ul li a").first().trigger('click');
});
}, 1000);
});

9 REPLIES 9

Yasin Shaik11
Tera Contributor

please find the attachment 

jaheerhattiwale
Mega Sage
Mega Sage

@Yasin Shaik11 Try updating the UI Script code as below

 

$(document).ready(function() {
setTimeout(function() {
$("#sp-nav-bar ul li a").first().mouseover(function() {
$("#sp-nav-bar ul li a").first().trigger('click');
});

$("#sp-nav-bar ul li a").first().mouseout(function() {
$("#sp-nav-bar ul li a").first().trigger('click');
});

$("#sp-nav-bar ul li .dropdown-menu").first().mouseout(function() {
$("#sp-nav-bar ul li a").first().trigger('click');
});
}, 1500);
});

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

@jaheerhattiwale 

Hi Jaheer,

Thanks for your reply,

It is working good. One more issue has been noticed that as per given attachment, first I have hover the Hamburg menu and then the cursor moves to request item menu if you noticed that(please refer the attachment) the hovering colour for the Hamburg menu is remains same only even if the cursor move to the other items. Actually it has to be normal.

That is the issue I am facing. Could you please tell  what I need to change.

 

@Yasin Shaik11 Got the issue. Let me check if we can fix this.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023