Shopify themes, liquid, logos, and UX
am using a Sense version 9.0.0
Want to make a different look to the site and have my announcement bar move like a stock market bar?
Solved! Go to the solution
This is an accepted solution.
Hello @MyMawduh
Could you please provide your store URL and, if it is password protected, please share the password so I can review it and provide a solution.
Hi,
Please share your store URL and if your store is password protected then also provide password too.
Thank you.
Hello @MyMawduh
Please refer to this URL: It might be helpful to you-
https://community.shopify.com/c/shopify-design/moving-announcement-bar/td-p/1585168
Woow lots of code for a simple task. I kinda got lost on what to do.
cant we just generate a CSS code to add to the announcement bar?
Hello @MyMawduh ,
You can try to do this:
1. Go to Online Stores -> Theme -> Actions -> Edit code
2. Open the theme.liquid -> add the following code
<script>
function ticker() {
var bar = document.getElementById('announcement-bar');
var width = bar.offsetWidth;
var parentWidth = bar.parentNode.offsetWidth;
var limit = width - parentWidth;
var step = 1;
var direction = -1;
var position = 0;
setInterval(function() {
if (position === 0 || position === limit) {
direction = -direction;
}
position += step * direction;
bar.style.transform = 'translateX(' + -position + 'px)';
}, 10);
}
document.addEventListener('DOMContentLoaded', ticker);
</script>
3. Save and preview
Hope this can help.
Ali Reviews team.
No it did not work
This is an accepted solution.
it's working. can you check the site and tell me what you think, please?
I really like it on the mobile version, but on the desktop, it's slow and was thinking if I can change the color.
oh my god i completely missed everything up 😥
@MyMawduh what happened dude?
You didn't add na
<marquee behavior="scroll" direction="left" scrollamount="20">
for fast scrolling?
Hello Ujjaval,
the marquee is not available in the theme, am I wrong?
I am working to achieve the same result and trying to adapt the marquee I have to my announcement bar, but it flickers by scrolling for a sec in the opposite direction. Could u pls give me a hand to fix it?
Hey, for some reason i don't appear to have the code. Is it something to do with my theme?
Any help appreciated 🙂
hi can you copy paste this marquee code please? thank you
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024