jquery show () / hide () problema no Internet Explorer?
O código html a seguir funciona no Firefox, mas por algum motivo falha no IE (o Label2 não é mostrado). Isso é um bug ou sinto falta de algo?
Qualquer ajuda seria apreciada.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js" type="text/javascript">
</script>
<script>
jQuery(document).ready(function(){
function setVis(){
var val = $("#check").is(":checked");
if (val)
$("#g_1").show();
else
$("#g_1").hide();
}
setVis();
$("#check").change(setVis);
});
</script>
</head>
<body>
<span>
<input type="checkbox" id="check" />
<label>Label1</label>
</span>
<span id="g_1">
<label>Label2</label>
</span>
</body>
</html>