(function ($) { $.fn.onPressNumber = function () { $.fn.keydown(function (e) { alert('ffdfd') }) }; $.fn.onPressNumber = function () { $.fn.keyup(function (e) { alert('ffdfd') }) }; })(jQuery); $('#ffff').onPressNumber();
$('#idOfDiv').on('keyup keydown',nameOfFunctionToRun);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)