Skip to content

Instantly share code, notes, and snippets.

@hitsujiwool
Created April 3, 2012 12:40
Show Gist options
  • Save hitsujiwool/2291666 to your computer and use it in GitHub Desktop.
Save hitsujiwool/2291666 to your computer and use it in GitHub Desktop.
JSONP Request Fails in IE6
<a href="javascript:void(0);">click</a>
<div id="log"></div>
$(function() {
function log(message) {
$('#log').append('<p>' + message + '</p>');
}
$('a').bind('click', function() {
jQuery
.ajax({
url: 'http://search.twitter.com/search.json',
dataType: 'jsonp',
data: { q: 'hitsujiwool' }
})
.done(function(data) {
log('ok');
})
.fail(function(a, b) {
log('ng');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment