2013-05-21 50 views
0

我想安装一个社交分享栏jQuery脚本。不过由于某种原因,它不会加载,我似乎无法找到原因。这个脚本为什么不启动?

在该网站的负责人,我的jQuery与jQuery脚本一起加载喜欢它指出这样做:

<script type="text/javascript" src="http://www.moviepostersdb.com/js/jquery.min.js"></script> 
<script type="text/javascript" src="http://www.moviepostersdb.com/js/jquery.social.share.2.2.js"></script> 

脚本安装还要求把一些额外的脚本入目:

<script type='text/javascript'> 
$(document).ready(function($){ 
$('#social-share').dcSocialShare(); 
size: 'horizontal', 
    location: 'bottom', 
    offsetAlign: 0, 
    offsetLocation: 0, 
    buttons: 'twitter,facebook,linkedin,digg,stumbleupon,delicious,pinterest,xing,buffer,print,email', 
    floater: false, 
    autoClose: true 
}); 
}); 
</script> 

这也被实施。

身体的结束标记之前,安装也要求实现下面的代码......再次,我也做到了这一点:

<div id="social-share"></div> 

尽管如此,出于某种原因...社交侧边栏没有出现在网站上。任何人都可以看到什么可能是错的?

www.movi​​epostersdb.com < ---网站的URL。

+1

这是PHP? – hexacyanide

+0

似乎你刚刚复制了JavaScript的随机部分,并期望它神奇地工作。这在严峻的现实中不会发生。 – zerkms

+2

@zerkms:不;他使用的是一个jQuery插件。 – SLaks

回答

5

看起来你有一个语法错误。

$('#social-share').dcSocialShare(); 
           ^-- closed here 

我想你的意思是:

$(function(){ 
    $('#social-share').dcSocialShare({ 
     size: 'horizontal', 
     location: 'bottom', 
     offsetAlign: 0, 
     offsetLocation: 0, 
     buttons: 'twitter,facebook,linkedin,digg,stumbleupon,delicious,pinterest,xing,buffer,print,email', 
     floater: false, 
     autoClose: true 
    }); 
}); 
0

它应该是:

$(function(){ 
$('#social-share').dcSocialShare({ 
    size: 'horizontal', 
    location: 'bottom', 
    offsetAlign: 0, 
    offsetLocation: 0, 
    buttons: 'twitter,facebook,linkedin,digg,stumbleupon,delicious,pinterest,xing,buffer,print,email', 
    floater: false, 
    autoClose: true 
}); 
}); 

所以$('#social-share').dcSocialShare();是一个错误的密切

相关问题