Mozilla Firefox 38.0.1 not compatible with jQuery???

Mozilla Firefox 38.0.1 not compatible with jQuery???

This is weird. The following code snippet works fine with the latest versions of IE, Chrome, and Opera, but will not work with the latest Mozilla Firefox ver. 38.0.1. Can someone please tell me why?? Could this be a jQuery issue?? The code snippet is right below.


<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
    $(function() {
        var sAllowableCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        $("#txtText").on({
            keypress: function(event) {
                var s = String.fromCharCode(event.keyCode);
                if (sAllowableCharacters.indexOf(s) === -1) {
                    return false;
                }
            },
            keyup : function(event) {
                var sInput = $("#txtText").val().trim();
                console.log("sInput=" + sInput);
            }
        });
    });

</script>
<style>
</style>
</head>
<body>   
    <label>Phone Number:&nbsp;<input id="txtText" /></label>
</body>
</html>


Thanks.