This is great. Subscribed. Thank you. Question: I tried adding this to my Header template, but when it closes, the body of the page remains stationary. Is there a way to get the body to close the gap as well? Or does this only work in the body of the page?
That's a really neat trick! However, I have a small issue with it: after closing the bar, every time a new page is loaded it reappears for a few micro-seconds. Is this fixable?
I used this code instead " jQuery(document).ready(function($) { // When the close-bar icon is clicked, hide the notice-bar $('.close-bar').on('click', function() { $('.notice-bar').hide(); // You can use .fadeOut() for a smoother animation }); // Change cursor to pointer on hover over close-bar $('.close-bar').css('cursor', 'pointer'); }); " but it won't work outside of elementor. only works while logged in
You can center an element that positioned absolute precisely via
top: 50% and then transform => offset = > offsetY = -50%
in the video you use css class for container bar-container in the code it is notice-bar. So CSS class for container ist notice-bar.
You are right, thanks for that observation.
איזה כיף שאתה קיים! ❤
תודה רבה 👑
This is great. Subscribed. Thank you. Question: I tried adding this to my Header template, but when it closes, the body of the page remains stationary. Is there a way to get the body to close the gap as well? Or does this only work in the body of the page?
Awesome video. Thank you! Subscribed!!
Extremely helpful, thank you!
Suuuuuuuuuuuubscribed! You’re awesome bro!
Great video, I have an issue the space that occupied the bar still there until refresh
That's a really neat trick! However, I have a small issue with it: after closing the bar, every time a new page is loaded it reappears for a few micro-seconds. Is this fixable?
gsap two animation not working in one frame(using text in and image in another frame)
too much work. I just downloaded the top bar plugin. 😭
True, but also your website will run slower with more plugins.
code didn't work for me :(
I used this code instead
"
jQuery(document).ready(function($) {
// When the close-bar icon is clicked, hide the notice-bar
$('.close-bar').on('click', function() {
$('.notice-bar').hide(); // You can use .fadeOut() for a smoother animation
});
// Change cursor to pointer on hover over close-bar
$('.close-bar').css('cursor', 'pointer');
});
"
but it won't work outside of elementor. only works while logged in