简单的 jQuery(scrollTo 和 animate)在 IE 中不起作用 [英] Simple jQuery (scrollTo and animate) not working in IE
问题描述
我刚刚注意到一些简单的 jQuery 不适用于移动版 IE9 和 IE10.我有一些版权链接和使用 animate()
的简单滑动联系表单.此外,我将 scrollTo 插件与 jQuery 结合使用.我尝试了不同的版本,仍然没有解决方案.也许我遗漏了一些明显的东西.
I just now noticed that some simple jQuery is not working on IE9 and IE10 for mobile.
I have some copyright links and simple sliding contact form which uses animate()
.
Also I use scrollTo plugin in combination with jQuery. I tried different versions, and still no solution. Maybe I am missing something obvious.
这是一个版权链接和用于打开和关闭联系表单的代码.
Here is the code for one copyright link and for contact form to open and close.
$('#privacy').click(function(){
$('#copyright').hide('fast');
$('#policy').toggle('slow');
$.scrollTo('+=800px', 800, { axis:'y' });
});
$('#plusSign').click(function(){
if ($('#contactFormHolder').hasClass('active')){
$('#contactFormHolder').animate({top:'-200px'},1000).removeClass('active');
}else{$('#contactFormHolder').animate({top:'0px'},1000).addClass('active');}
});
您可以在 http://www.crazysunsets.com
推荐答案
您的标记无效,特别是脚本标记格式:
Your markup is invalid, specifically the script tag format:
变化:
<script type="text/javascript ">
致:
<script type="text/javascript">
去掉'javascript'后面的空格
Remove the space after 'javascript'
干杯!
这篇关于简单的 jQuery(scrollTo 和 animate)在 IE 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!