Simple jQuery not working in IE

不羁的心 提交于 2019-12-09 13:35:14

问题


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');}

});

You can check it live on http://www.crazysunsets.com


回答1:


Your markup is invalid, specifically the script tag format:

Change:

<script type="text/javascript ">

To:

<script type="text/javascript">

Remove the space after 'javascript'

Cheers!




回答2:


goto bottom path:
tools menu=>internet Option=>Advanced Tab=>in setting list=>in browsing group

unchecked the "Disable script debbugging(ie)" and "Disable script debbugging(others)" options(checkboxes). now refresh page. ie send error line and error name for you!



来源:https://stackoverflow.com/questions/14505714/simple-jquery-not-working-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!