问题
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