Created
November 21, 2012 00:51
-
-
Save choonkeat/4122339 to your computer and use it in GitHub Desktop.
This file contains 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
<p> | |
<strong>fetched</strong> | |
content | |
</p> |
This file contains 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 MyClass = { | |
display: function() { | |
var ele = $('script:last'); | |
$.get('content.html', function(data) { | |
ele.after(data); | |
}); | |
} | |
} |
This file contains 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
<html> | |
<head></head> | |
<body> | |
<p>text before</p> | |
<script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script> | |
<script src="file.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
MyClass.display(); | |
</script> | |
<p>text after</p> | |
<script> | |
console.log('nothing here'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment