简单的jQuery在IE中不起作用 [英] Simple jQuery not working in IE
问题描述
我jsut现在注意到,一些简单的jQuery无法在IE9和IE10移动版上运行. 我有一些版权链接和使用animate()的简单滑动联系表. 另外,我将scrollTo插件与jQuery结合使用.我尝试了不同的版本,但仍然没有解决方案.也许我缺少明显的东西.
I jsut 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在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!