Is there a way to get work .keypress on a div element like this?:
<html>
<body>
<script type="text/javascript">
<!--
$('#idtext').keypress(function(event) {
var keyCode = event.keyCode;
$('#idtext').text(function(i, text) {
return text + String.fromCharCode(keyCode);
});
});
// -->
</script>
<div id="idtext"></div>
</body>
</html>