Skip to main content

Bug Tracker

Side navigation

Ticket #6941: script-test.html
File script-test.html, 0.6 KB (added by lathan, August 24, 2010 08:13PM UTC)
<html>
	<head>
		<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" language="javascript">
			$(function(){
				var str = '<div class="upload">' +
						'<scr' + 'ipt class="after" type="text/template">' +
						    '<div>hi</div>' +
						'</scr' + 'ipt>' +
					    '</div>';
				
				$('#container').html(str);

				console.log($('#container').children().get());
				// log shows that the script tag has jumped outside of its parent div
				// Why is this?
				});
		</script>
	</head>
	<body>
		<div id="container">
		</div>
	</body>
</html>

Download in other formats:

Original Format