Skip to content

Instantly share code, notes, and snippets.

@paulness
Created March 31, 2015 17:47
Show Gist options
  • Save paulness/829e9678d1e922248ef8 to your computer and use it in GitHub Desktop.
Save paulness/829e9678d1e922248ef8 to your computer and use it in GitHub Desktop.
Underscore bug with jQuery load
<html>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>$('<div/>').load('http://localhost/gatedmedicalregistration/gistfile2.html', function (e) {
$(this).appendTo('body');
});
</script>
</body>
</html>
<script type="text/javascript">(typeof _ == undefined) || document.write('<script src="http://underscorejs.org/underscore.js">\x3C/script>')</script>
Hello I would be shown if underscore was not here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment