I typically see version 1 but some open source projects I work on use version 2 and I've used version 3 in the past. Does anyone have a more elegant solution, maybe one that's more scalable?
Version 1:
var text1 = 'this is my script\'s content';
Version 2:
<script type="text/plain" id="text1">This is my content</script>
<script> var text1 = $('#text1').html(); </script>
Version 3:
<input type="hidden" id="text1" value="this is my content">
<script> var text1 = $('#text1').val(); </script>
Version 4:
<span class="hidden" id="text1">this is my content</span>