[英]bad javascript? hello bar solo only working on homepage - no other pages
I'm running a bigcommerce store and have the hello bar solo custom code installed in the site footer. 我正在经营一家bigcommerce商店,并在网站页脚中安装了hello bar单独自定义代码。 I've also tried placement of the hellobar code in various spots (header template files, default template files, page specific template files).
我还尝试将hellobar代码放置在各个位置(标题模板文件,默认模板文件,页面特定的模板文件)。 For some reason the hello-bar only works on my homepage, but never on any of the other pages.
出于某种原因,hello-bar仅在我的主页上起作用,而在其他任何页面上却不起作用。
Any ideas as to why? 有什么想法吗? Seems like if i place this in the footer it should show up on every pages but that's not what i'm getting.
似乎如果我将其放在页脚中,它应该显示在每页上,但这不是我得到的。 please let me know if you need more details or code samples to help.
如果您需要更多详细信息或代码示例以帮助您,请告诉我。
thanks 谢谢
btw, bigcommerce support also thinks that the hellobar should show up on every page if i have this code in the footer, but its not working. 顺便说一句,bigcommerce支持人员还认为,如果我在页脚中有此代码,则hellobar应该显示在每个页面上,但它不起作用。 my guess is that it's the javascript but I dont know my way around that.
我的猜测是这是javascript,但我不知道该如何解决。
Here's the code I'm using: 这是我正在使用的代码:
<div id="mailchimp_form" style="display:none;">
<form action="http://xxxxx.us5.list-manage.com/subscribe/post" method="POST">
<input type="hidden" name="u" value="xxxxxxxx">
<input type="hidden" name="id" value="xxxxx">
Get an instant coupon code by signing up to our newsletter. Email: <input type="email" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="" />
<input class="button" type="submit" value="Subscribe" />
</form>
</div>
<!-- Hello Bar configuration start -->
<script type="text/javascript">
var mailChimpForm = document.getElementById('mailchimp_form').innerHTML;
new HelloBar( mailChimpForm, {
showWait: 1000,
positioning: 'sticky',
fonts: 'Arial, Helvetica, sans-serif',
forgetful: true
}, 1.0 );
</script>
And here are the references that I've placed in the header: 这是我放在标题中的引用:
<link type="text/css" rel="stylesheet" href="content/hellobar.css" />
<script type="text/javascript" src="content/hellobar.js"></script>
No idea what bigcommerce is, but judging from what you supplied I am guessing one of two reasons. 不知道什么是bigcommerce,但是从您提供的内容来看,我猜是两个原因之一。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.