-
-
Save mikelikesbikes/311550 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
<html> | |
<head> | |
<script type="text/javascript"> | |
jQuery(function($){ | |
//tested | |
$('script.html_script').each(function() { | |
$(this).replaceWith($(this).text()); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<h1>Some header</h1> | |
<p>Some content</p> | |
<script type="text/html" class="html_script"> | |
<p>I'm a set of UI controls that require JS but now I'm contextually relevant and I'm not littering anyone's JS files with HTML!</p> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment