这是我的图像代码
<li><a href="#"><i class="icon-envelope icon-2x"></i></a></li>
这是我弹出的javascript代码来自&#34; Klaviyo&#34;
<script type="text/javascript" src="//www.klaviyo.com/media/js/public/klaviyo_subscribe.js"></script>
<script type="text/javascript">
(document).ready(function(){
$('icon-envelope icon-2x').on('click',function(){
KlaviyoSubscribe.attachModalSignUp({
list: 'g9cZtX',
delay_seconds: 0.5,
content: {
clazz: ' klaviyo_modal_g9cZtX',
header: "Interested in our Newsletter?",
subheader: "Stay in the know with news and promotions.",
button: "Subscribe",
success: "Thanks! Check your email for a confirmation.",
styles: '.klaviyo_modal.klaviyo_modal_g9cZtX { font-family: "Helvetica Neue", Arial}.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_header { color:#222;}.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_subheader { color:#222;}.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_submit_button,.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_submit_button span { background-color:#07234F; background-image: none; border-radius: 2px;}.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_submit_button:hover,.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_submit_button span:hover { background-color:#2A4D85; background-image: none; }.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_inner,.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_fieldset .klaviyo_field_group input[type=text],.klaviyo_modal.klaviyo_modal_g9cZtX .klaviyo_fieldset .klaviyo_field_group input[type=email] { border-radius: 2px;}'
}
});
});
});
</script>
我不确定我的错误在哪里。谢谢,
答案 0 :(得分:0)
修复
(document).ready(function(){
至$(document).ready(function(){
和
$('icon-envelope icon-2x').on('click',function(){
至$('.icon-envelope').on('click',function(){