Need to add the Hamberg menu on the portal header next to the logo

Yasin Shaik11
Tera Contributor

@jaheerhattiwale 

 

Hi jaheer,

 

Hope your doing well.!

 

On the portal header  next to the logo need to add Hamburg menu(PFA) whenever user hover it has to show some options like for example Catalog , Knowledge , Request something etc. 

 

Could you please help me how to do this.and what i need to add in the HTML and CSS code and where .

 

Thanks in advance. 🙂 

 

 

1 ACCEPTED SOLUTION

@Yasin Shaik11 Create the menu first as per the earlier procedure I shared. Then follow below steps.

 

1. Go to "System UI > UI Scripts" module

jaheerhattiwale_0-1673538808866.png

 

2. Create a new UI Script

jaheerhattiwale_1-1673538830110.png

 

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);
});

 

3. Open your portal record and open theme

jaheerhattiwale_2-1673538889866.png

 

 

4. Add a JSS include to the theme

jaheerhattiwale_3-1673538925424.png

 

 

5. Add the UI Script created in JSS include

 

Note:

The script will only work for the first left menu. So keep the Hemberger icon at left only.

 

Please mark all the answers on this question as correct answer if these solved your issue. 

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

View solution in original post

10 REPLIES 10

@Yasin Shaik11 Let me come back here with procedure

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

@jaheerhattiwale  Awaiting for your valuable reply 

@Yasin Shaik11 Create the menu first as per the earlier procedure I shared. Then follow below steps.

 

1. Go to "System UI > UI Scripts" module

jaheerhattiwale_0-1673538808866.png

 

2. Create a new UI Script

jaheerhattiwale_1-1673538830110.png

 

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);
});

 

3. Open your portal record and open theme

jaheerhattiwale_2-1673538889866.png

 

 

4. Add a JSS include to the theme

jaheerhattiwale_3-1673538925424.png

 

 

5. Add the UI Script created in JSS include

 

Note:

The script will only work for the first left menu. So keep the Hemberger icon at left only.

 

Please mark all the answers on this question as correct answer if these solved your issue. 

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

it's working fine. Thanks a lot jaheer @jaheerhattiwale 

@jaheerhattiwale 

Hi Jaheer,

It is working fine for OOB sp portal and coming to our custom portal not working and I was change the code  accordingly like instead of sp--> i mentioned our portal name. apart from this  Do we need to change other things. Please let me know.