2017-02-06 51 views
-2

我有2个不同的网站相同的代码,1是工作的罚款和其他一个看起来是不是做的jQuery功能为什么我的jquery不能在不同的域上工作?

<!DOCTYPE html> 
<html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
    <title>jQuery Countdown</title> 
    <link rel="stylesheet" href=/build/timer/css/jquery.countdown.css"> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>  
    <script src="/build/timer/js/jquery.plugin.min.js"></script> 
    <script src="/build/timer/js/jquery.countdown.js"></script> 
    <script> 
     var j = jQuery.noConflict(); 
     j(function() { 
     var austDay = new Date(); 
     austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); 
     j('#defaultCountdown').countdown({until: austDay});  
     j('#year').text(austDay.getFullYear()); }); 
    </script> 
    <style> 
     #defaultCountdown {margin-left: -380px;width: 740px;height: 65px;} 
     #defaultCountdown span {font-size: 30px;font-family: Arial;} 
     body {background: #0f0017;} 
    </style> 
    </head> 
<body> 

    <div id="defaultCountdown"></div> 

</body> 
</html> 

这里是我的代码..

这里是一个工作环节:http://signalsindicator.com/timer/index.html 这里不是一个工作:https://traders.institute/build/timer/index.html

什么可能导致这个问题,他们都是相同的代码?

+0

在一个页面上,你使用没有任何冲突,其工作正常,但对其他你要使用没有冲突走样,这似乎是不工作 –

回答

1

第二个链接你postet是HTTPS,所以你必须加载以https脚本也是如此。

-1

还缺少样式表周围的开头引号。

HREF = “/编译/定时器/ CSS/jquery.countdown.css”>

0

什么可能会造成这个问题,这是他们两个相同的代码?

答案:混合内容问题。当初始HTML被加载通过安全的HTTPS连接发生

的混合的内容,但其他资源(如图片,视频,样式表,脚本)被装载在一个不安全的HTTP连接。

...更多细节here

相关问题