I am having some trouble loading some javascript onto a page. It works when I embed the script directly into the page, but when I use ajax/jquery/getScript, it doesn't load. I think it might have something to do with async/sync or maybe some kind of cross domain restrictions.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$.ajax({
url: 'http://mobile.adnxs.com/ttj?id=1573223',
crossDomain: true,
dataType: "script",
success: function () {
// script is loaded
},
error: function () {
// handle errors
}
});
</script>