Created
June 24, 2015 12:02
-
-
Save prasofty/76a5ae62873ff42b43e2 to your computer and use it in GitHub Desktop.
for ie9 does support xhr headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $note_html = $(data); | |
if($note_html.hasClass('user_prospects_note')) { | |
$('#prospectsEmptyNotes').remove(); //if this is first note, delete empty node. | |
if($('#'+$note_html.attr('id')).length == 0) { | |
$('#user_prospects_notes .sp-container').prepend(data); | |
} else { | |
$('#'+$note_html.attr('id')).replaceWith(data); | |
} | |
$('#as-modal').modal('hide'); | |
} else { | |
$("#as-modal").html(data); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(xhr.getResponseHeader('blockId') != null) { | |
$('#prospectsEmptyNotes').remove(); //if this is first note, delete empty node. | |
if($(xhr.getResponseHeader('blockId')).length == 0) { | |
$('#user_prospects_notes .sp-container').prepend(data); | |
} else { | |
$(xhr.getResponseHeader('blockId')).replaceWith(data); | |
} | |
$('#as-modal').modal('hide'); | |
} else { | |
$("#as-modal").html(data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment