Patrick Caldwell
Patrick Caldwell

Reputation: 3

jQuery script not working in IE

I have having a problem with a jQuery script showing up in every other browser except IE.

Below is a very very very simplified version of the script and this wont even show up. Please help I've been working on this problem for about 2 weeks now.

<script type="application/javascript">
    $.getTime = function(zone, success) 
    {
        var url = 'http://json-time.appspot.com/time.json?tz=' + zone + '&callback=?';
        $.getJSON(url, function(o){
                success(new Date(o.datetime), o);
        });
    };
</script>

calls the function to load library hours

<script type="application/javascript">
$.ajax({ type: "GET" ,url: "xml/LibraryHours.xml", dataType: "xml", success: function(xml){
                $.getTime('GMT', function(time)
                 {
                    $('<li/>').html('Work' ).appendTo('#update-target p');
                });}}); //close ajax{

then the update html area:

    <div id='update-target'>
     <!--<a href="#">Click here to load Library hours</a>-->
     <p></p> 
    </div>

Upvotes: 0

Views: 280

Answers (1)

Andy Evans
Andy Evans

Reputation: 7176

Shouldn't your tags have a type of text/javascript (e.g. type="text/javascript") instead of application/javascript?

Also, your script tag for your "jquery.min.js" has no type set.

Upvotes: 1

Related Questions