Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple jQuery (scrollTo and animate) not working in IE

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

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

like image 634
fluxus Avatar asked Jan 24 '13 16:01

fluxus


2 Answers

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!

like image 170
darshanags Avatar answered Oct 22 '22 07:10

darshanags


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!

like image 4
Ali Rasouli Avatar answered Oct 22 '22 07:10

Ali Rasouli