Hello There,
You do not need a code. Do you know that a slider can be assign above the menu bar and below the menubar? Yes, you can assign your layerslider right below the menu bar. Simply edit the page and find the Slider Settings: Below Masthead option. You may check out this screenshot: https://prnt.sc/hcni41
https://image.prntscr.com/image/Zweo-SkXQqy70ULPP1rtdA.png
Or if you in Cornerstone, you can check it out right here: https://prnt.sc/hcnig1
https://image.prntscr.com/image/g3AAnEUCS1qhg9mFOyrFOA.png
You may check out my test page I have created which is in the secure note. In this test page I also added a custom css, to remove the default border of the slider and the default top margin of the page. You can ignore the page title at the moment because the page title will disappear if you set the page as your homepage. This is the css I added in the settings tab, Settings > Custom CSS
.x-slider-container.below {
border: none;
}
.x-container.max.width.offset {
margin-top: 0px;
}
Hope this helps.