IE中的jQuery插件问题
jQuery plugin issues in IE
我不明白为什么我的代码在internet explorer上不起作用/这是我调用js库的index.php。
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/shadowbox.js" ></script>
<script type="text/javascript" src="js/slides.min.jquery.js" > </script>
<script type="text/javascript" src="js/jquery.simpleWeather-2.0.1.min.js" > </script>
<script type="text/javascript" src="js/jquery.clock.js" > </script>
<script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="js/default.js" > </script>
这是我的默认.js
$(document).ready(function() {
Shadowbox.init({
overlayOpacity: 0.8
}, setupDemos);
if (typeof $().slides != "undefined") {
$('#slides').slides({
preload: true,
preloadImage: 'images/slides/loading.gif',
play: 3000,
pause: 2500,
hoverPause: true,
animationStart: function(current){
$('.caption').animate({
bottom:-35
},100);
},
animationComplete: function(current){
$('.caption').animate({
bottom:0
},200);
},
slidesLoaded: function() {
$('.caption').animate({
bottom:0
},200);
}
});
}
$.each($(".menu li"), function(index, li) {
if ($(li).hasClass("active")) {
$("title").append(": " + $(li).children("a").text());
}
});
if (typeof $.simpleWeather != "undefined") {
$.simpleWeather({
location: 'Armenia, Yerevan',
unit: 'c',
success: function(weather) {
html = "<div style='height: 117px;'><h2>"+weather.city+', '+weather.region+'</h2>';
html += '<img style="float:left;" width="125px" src="'+weather.image+'">';
html += '<p>'+weather.temp+'° '+weather.units.temp+'<br /></p>';
html += '</div>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>'+error+'</p>');
}
});
}
$('#yerevan-time').clock({offset: '+4', type: 'analog'});
$('#london-time').clock({offset: '+0', type: 'analog'});
$('#new-york-time').clock({offset: '-5', type: 'analog'});
});
function setupDemos() {
Shadowbox.setup("a[rel=photos]", {
gallery: "cars",
continuous: true,
counterType: "skip"
});
}
$(function() {
$( "#day1" ).datepicker();
$( "#day2").datepicker();
});
我在这里找不到解决方案。你可以在这里查看。这是我的网站。所以在互联网浏览器中,时钟和天气都不起作用。这里有什么问题。任何帮助都是有用的。谢谢
错误与您发布的代码无关。。
如果你检查控制台,你会看到一个与谷歌地图有关的错误。
当您运行initialize
方法时(您将其绑定到body
标记的onload
事件)
删除该选项以检查时钟是否正常工作,然后确保只有在页面中显示地图时才运行。。
<小时>更新
另一个更重要的问题是,你使用的时钟插件有这样的代码
jQuery(_this)
.find(".sec")
.css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
看到供应商前缀-moz-
和-webkit-
意味着指针的旋转仅适用于mozilla和webkit浏览器。。
他们特别排除了所有其他浏览器。。
<小时>现代IE(>=9)解决方案
对于IE>=9,您可以添加"-ms-transform" : srotate
jQuery(_this)
.find(".sec")
.css({"-moz-transform" : srotate, "-webkit-transform" : srotate, "-ms-transform" : srotate});
并且它将工作(因为IE>=9支持旋转。)
(请确保所有手的代码都正确。我的例子只是关于秒)
小时>小时>相关文章:
- 我的jQuery插件参数没有正确启动,遇到了问题
- TableExport jquery插件:文件名和扩展名问题
- Jquery标签插件粘贴问题
- 使用科尔多瓦媒体插件时出现问题
- 我的Firefox插件和跨域https存在问题
- 应用程序版本插件问题
- SlimScroll JQuery插件中的滚动条问题
- 由于jQuery问题,在实现Disqus插件时出现问题
- browserfy的brfs插件中出现问题
- Ruby(rails)时间戳和jQuery timeago插件出现问题
- jQuery表单验证插件's只有文字字段的问题
- IE10中使用jQuery floatThead插件(1.2.10)的布局问题
- [contenteditable]元素和jQuery验证插件的问题
- IE9上的Jquery表单插件问题
- Cordova/phonegap 插件兼容性问题 - org.chromium.socket / org.chromiu
- 这个快照 svg 插件有什么问题
- 刷新整页.js插件的问题
- Phonegap facebook插件:安卓系统的各种问题
- jQuery插件和 ASP.NET 内容页面的问题
- 通过Chrome自定义插件在浏览器当前页面中选择元素的问题