You can add input event. It is an event that triggers whenever the input changes. Input works both on desktop as well as mobile phones
test.on('keyup input', function(){
//code
});
You can check this answer for more details on jQuery Input Event
More Related Contents:
- How do I detect a click outside an element?
- jQuery click events firing multiple times
- Can I call jQuery’s click() to follow an link if I haven’t bound an event handler to it with bind or click already?
- $(document).click() not working correctly on iPhone. jquery [duplicate]
- onClick not working on mobile (touch)
- Why is this jQuery click function not working?
- Need to cancel click/mouseup events when double-click event detected
- Triggering a JavaScript click() event at specific coordinates
- What the difference between .click and .change on a checkbox [duplicate]
- How to stop default link click behavior with jQuery
- How to handle floats and decimal separators with html5 input type number
- jQuery click anywhere in the page except on 1 div
- :touch CSS pseudo-class or something similar?
- Detect between a mobile browser or a PhoneGap application
- How to check browser for touchstart support using JS/jQuery?
- Use jQuery to detect whether a device can make telephone calls (supports “tel://” protocol)
- Difference between .click() and actually clicking a button? (javascript/jQuery)
- JavaScript: Invoking click-event of an anchor tag from javascript
- Choosing Mobile Web HTML5 Framework [closed]
- How to detect a mobile device using jQuery
- Jquery: mousedown effect (while left click is held down)
- Registering jQuery click, first and second click
- How to remove all click event handlers using jQuery?
- iphone/ipad triggering unexpected resize events
- Programmatical click on -tag not working in Firefox
- html5 drag and drop FOR MOBILE [duplicate]
- Is there an equivalent to e.PageX position for ‘touchstart’ event as there is for click event?
- jQuery .on() method doesn’t see new elements
- Cancel click event in the mouseup event handler
- Why isn’t my checkbox change event triggered?