# \[solved\] Trouble in testing \<input\> with manual event trigger

**URL:** <https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181>\
**Category:** Help Requests\
**Created:** [May 2, 2018, 4:46am UTC](https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181 "2018-05-02T04:46:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)\
**Post date:** [May 2, 2018, 4:46am UTC](https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181/1 "2018-05-02T04:46:22Z")

</div>

I have trouble to test something simple like this

```auto
<input value.bind="message">

```

Aurelia doc says it will update model on “change” and “input” event. [https://aurelia.io/docs/binding/binding-behaviors#updatetrigger](https://aurelia.io/docs/binding/binding-behaviors#updatetrigger)

I try to use jQuery to mutate the input, then manually trigger a “change” event. But my model “message” still doesn’t update.

```auto
jQuery('input').val('test').trigger('change');

```

Here is a gistrun to demonstrate my problem. Did I do something wrongly?

> **[Bring your Gists to life with GistRun](https://gist.run/?id=24bddb1ca8e502bcac280fbb3368dd30)**
>
> GistRun is a site for running, creating and updating GitHub Gists. With GistRun you can easily share Gists on StackOverflow.

---

<div class="post-metadata">

**Author:** ![Kukks](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/kukks/32/361_2.png) [@Kukks](https://discourse.aurelia.io/u/Kukks)\
**Post date:** [May 2, 2018, 7:00am UTC](https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181/2 "2018-05-02T07:00:41Z")

</div>

I have a feeling that jquery does some internal magic with events which Aurelia can’t detect.

I changed the gist to a functional one by using jquery’s `get` to return the actual html element and then triggering the event in the native vanilla js way

> **[Bring your Gists to life with GistRun](https://gist.run/?id=a0d62e1bde3a538b25310d1da21c6445)**
>
> GistRun is a site for running, creating and updating GitHub Gists. With GistRun you can easily share Gists on StackOverflow.

---

<div class="post-metadata">

**Author:** ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)\
**Post date:** [May 2, 2018, 7:49am UTC](https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181/3 "2018-05-02T07:49:38Z")

</div>

Thank you @Kukks 😄

---

<div class="post-metadata">

**Author:** ![Kukks](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/kukks/32/361_2.png) [@Kukks](https://discourse.aurelia.io/u/Kukks)\
**Post date:** [May 2, 2018, 7:51am UTC](https://discourse.aurelia.io/t/solved-trouble-in-testing-input-with-manual-event-trigger/1181/4 "2018-05-02T07:51:29Z")

</div>

You can easily replace all of that jquery code though. Check the gist again, removed all the jquery “crap”. 🙂
