Question: I can setup this listener:

```
$('input[type="text"]').on('keyup paste input change', function() {
  console.log('Hello!');
});

```

If I open **DevTools** and do:

```
$('input[type="text"]').val('a new value');

```

None of the events above are called. Which event should I listen for this cases?

Answer: 
Changing an elements value programatically doesn't trigger an event, you'll have to do that yourself. You could use trigger to trigger event handlers in jQuery :

```
$('input[type="text"]').val('a new value').trigger('change');

```
The `.val()` function is designed not to trigger events when executed. What I mean by that is even though it could technically have that functionality due to how jQuery works. If you use the `.val()` function you can manually execute the event you would like using `$(element).val("something").click()/change()/input()/keyup()`