javascript - jQuery.ajax not working in IE7/8 -
something in script breaking ie.
i'm looking on collection of links class, , hijacking url's. clicking link animate height , reveal message. ajax request mark message read.
however, in ie goes url instead of staying on page , processing http request.
$('.message .subject .subject_link').click(function(e) { toggle_message(e) return false; }); function toggle_message(m) { var link = m.target; var parent = $(link).parent().parent(); console.log(link.href); $.ajaxsetup({ url: link.href, datatype: 'json', timeout: 63000, type: 'get', cache: false }); if($(parent).hasclass('unread')) { $(parent).addclass('read').removeclass('unread'); $.ajax({ complete: function(r, textstatus) { console.log(r.responsetext) } }); } if($(parent).find('.body_wrapper').hasclass('collapsed')) { $(parent).find('.body_wrapper').addclass('expanded').removeclass('collapsed'); $(parent).find('.body_wrapper').animate({ height: 'toggle' }) } else { $(parent).find('.body_wrapper').addclass('collapsed').removeclass('expanded'); $(parent).find('.body_wrapper').animate({ height: 'toggle' }) }
}
any ideas what's causing issue? http://support.cooper.krd-design.net/ tester: 12345 if want review page
thanks rich
adding
e.preventdefault();
before toggle_message in first function should work, although return false should well.
Comments
Post a Comment