Home › Forums › JavaScript › Getting .ajax to work in IE8?
- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
October 3, 2013 at 5:19 pm #151988mikes02Participant
I have searched extensively on Google and can’t find a solution to fix this problem:
// Availability $.ajaxSetup({cache:false}); $("a.ajax").click(function() { var post_url = $(this).attr("href"); var post_id = $(this).attr("rel"); $("#tabs").html('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>'); $("#tabs").load(post_url); $("a.ajax").removeClass("active"); $(this).addClass("active"); return false; }); // Default Load January Availability $("#tabs").empty().append('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>'); $.ajax({ url: siteUrl + '/?availability=january', success: function(html) { $("#tabs").empty().append(html); $('.availability-menu li:first-child a').addClass('active'); } });
I am using this code in WordPress to load in a custom single post template, but I can’t get it to work in IE8, any ideas?
October 6, 2013 at 3:41 pm #152180mikes02ParticipantI am using this to call jQuery so I believe that is grabbing the latest minified version, which as of this posting is v1.9.1
Perhaps I am not using this correctly but when I look in the developer tools console in IE I am not seeing anything displayed, here is the code I am using:
// Default Load January Availability $("#tabs").empty().append('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>'); $.ajax({ url: siteUrl + '/?availability=january', success: function(html) { $("#tabs").empty().append(html); $('.availability-menu li:first-child a').addClass('active'); } }); //FAIL $.ajax({url: siteUrl + '/?availability=january'}).fail(function( jqXHR, textStatus, errorThrown ){ console.log(textStatus); });
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘JavaScript’ is closed to new topics and replies.