Hide portal Header
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 04:29 AM
Hello everyone, I want to hide via client script on load the banner in portal.
is it possible to do it like this ?
function onLoad() {
var x = document.querySelector('div[aria-label="Primary"]');
x[0].style.display = "none";
}
Tried it also with getElemntByClassName() with no luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 05:14 AM
Hi @eyala ,
edit the CSS Of that Widget .
.sp-banner {
display: none;
}
Should my answer prove to be helpful, kindly mark it as such by clicking "Accept as Solution" and "Helpful."
Regards,
Manikanta. Kota
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 05:19 AM
I cannot edit the widget, The page is Record producer. can I add the on load there ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 06:36 AM
Hi @eyala ,
Not Sure the right process But Try with this. Please let me Know if it works
function onLoad() {
// Find the top banner by its CSS class
var topBanner = document.querySelector('.navbar-header');
// If the top banner is found, hide it
if (topBanner) {
topBanner.style.display = 'none';
}
}
Should my answer prove to be helpful, kindly mark it as such by clicking "Accept as Solution" and "Helpful."
Regards,
Manikanta. Kota