我正试图在页面加载时触发'谢谢'模式。它在我的本地机器上工作正常,但是当我把它放到暂存时,它将无法加载。目前使用自定义Wordpress主题。有什么建议吗?
我已经阅读了一些类似的问题并提供了各种答案,但似乎没有任何效果。
以下是模式应在页面加载(临时站点)上触发的页面:http://ce7.180.myftpupload.com/select-your-plan/thank-you/
<script type="text/javascript">
$(window).load(function(){
$('#myModal').modal('show');
});
</script>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Thank you for signing up!</h4>
</div>
<div class="modal-body">
<p>You just made one of the better decisions of your musicial life. We're honored and excited to have you as a part of our club.</p>
<p>While you're here, we'd love it if you would take a minute to share Vinyl Me, Please with your friends. All it takes is a click of a button ;-)</p>
<p>OH, and if you didn't already know, Vinyl Me, Please makes for a <a href="/give-a-gift">great gift</a>. Just sayin'.</p>
<p class="margin-bottom"><div class="fb-like pull-left margin-bottom margin-right" data-href="https://www.facebook.com/VinylMePlease" data-width="200" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<a class="twitter-share-button" href="https://twitter.com/share" data-url="http://vinylmeplease.com" data-text="I just signed up for @vinylmeplease, the best damn record club out there" data-related="VinylMePlease" data-size="large" data-hashtags="vinylme">Tweet</a>
<script>// <![CDATA[
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
// ]]></script> <button class="btn btn-default"><a href="mailto:?subject=Check out Vinyl Me, Please&body=Hey buddy, I just came across this site called Vinyl Me, Please and I think you'd really dig it. Every month they send you a new record pressed exclusively for their members with a custom art print and cocktail pairing. You usually have to request an invite, but you can sign up directly using this link: http://vinylmeplease.com/get-started/. Peace!">Send an email!</a></button></p>
</div></p>
<div class="modal-footer"></div>
</div>
</div>
</div>
答案 0 :(得分:1)
您在登台页面中使用了几个版本的jQuery(1.9.0
和2.1.3
),在第一个之后加载了bootstrap插件,并在第二个jQuery实例加载后立即丢失了它们。
在加载第二个jQuery实例后,移动引用引导程序插件的script
标记。