<html>
<head>
<script
src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
type="text/javascript"/></script>
<script>
$(function() {
alert($('#s1').html());
});
</script>
</head>
<body>
<p/>
<span id="s1"><h3>Eggs</h3>One dozen please</span>
</body>
</html>
This page puts up a blank alert with the <p> tag, but with <br> it shows '<h3>Eggs</h3>One dozen please', as I'd expected.
This appears to be the case with Firefox 12.0 and Chrome 19.0. IE8 gets it right. Any ideas what might be happening?