【问题标题】:Feedback and Facebook Code Clash somewhere反馈和 Facebook 代码冲突
【发布时间】:2012-08-29 07:52:59
【问题描述】:

我正在创建一个测试页面,一切都很顺利,直到我添加弹出 facebook like box facebook代码与反馈表发生冲突我尝试了这么多小时来解决这个问题,但我无法看到其中任何一个我希望两者都可见而没有任何错误 这是我的代码:

   <div id="contactable"><!-- contactable html placeholder --></div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript" src="http://boysjoys.com/final/scripts/jquery.validate.pack.js"></script>
<script type="text/javascript" src="http://boysjoys.com/final/scripts/jquery.contactable.js"></script>
<link rel="stylesheet" href="http://boysjoys.com/final/css/contactable.css" type="text/css" />
<script>$(function(){$('#contactable').contactable({subject: 'feedback URL:'+location.href});});</script>

<!--end contactable -->

<div> </div>

<!-- FACEBOOK WIDGET START -->
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'></script>
<script src="https://gj37765.googlecode.com/svn/trunk/html/[www.gj37765.blogspot.com]jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="https://gj37765.googlecode.com/svn/trunk/html/%5Bwww.gj37765.blogspot.com%5Dfbpopup.css" type="text/css" />
<script type="text/javascript">
jQuery(document).ready(function(){
if (document.cookie.indexOf('visited=flase') == -1) {
var fifteenDays = 1000*60*60*24*30;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({width:"400px", inline:true, href:"#mdfb"});
}
});
</script>
<div style="display:none">
<div id='mdfb' style='padding:10px; background:#fff;'>

<center>
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FBoysJoys&amp;width=300&amp;colorscheme=light&amp;show_faces=true&amp;border_color=%23ffffff&amp;stream=false&amp;header=false&amp;height=258" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:258px;" allowtransparency="true"></iframe>
</center>
</div>
</div>

【问题讨论】:

    标签: jquery forms html facebook-like


    【解决方案1】:

    您将两次包含 jQuery 库,一次用于不可接触,一次用于 facebook,删除第二个。

    这是一个工作小提琴http://jsfiddle.net/45yzC/

    【讨论】:

    • 感谢它现在的工作,但是当我从 fb 框中删除 jquery 库时,它减慢了 Facebook 之类框的加载过程,顺便说一句,感谢您的宝贵回复
    • sabit 嗨,我再次需要您的帮助,同样的问题,但这次反馈表不可见,我尝试了所有方法,但仍然无效,请帮我回复我,我会再次向您展示代码,谢谢您跨度>
    猜你喜欢
    • 1970-01-01
    • 2015-03-16
    • 2017-04-27
    • 1970-01-01
    • 1970-01-01
    • 2016-05-26
    • 2019-02-23
    • 2020-03-23
    • 1970-01-01
    相关资源
    最近更新 更多