Simple jQuery not working in IE

fluxus picture fluxus · Jan 24, 2013 · Viewed 23.1k times · Source

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

Answer

darshanags picture darshanags · Jan 24, 2013

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!