var currentPosDisplay = $('<input type=text id="currentPos" value="1" style="display:inline" >'); currentPosDisplay.on("keypress keydown keyup", function(e) { e.stopPropagation(); });