Skip to content

Conversation

stukennedy
Copy link

hidden input fields don't trigger the change() event.

For users who may just want to observe changes to the hidden input value and respond to it e.g.

$("input[type=hidden]").bind("change", function() {
    console.log($(this).val()); 
 });

This fix force-triggers the change() event and also only sets the value (and therefore the change) when the input value has changed.

hidden input fields don't trigger the change() event.

For users who may just want to observe changes to the hidden input value and respond to it e.g.
```js
$("input[type=hidden]").bind("change", function() {
    console.log($(this).val()); 
 });
```
This fix force-triggers the change() event and also only sets the value (and therefore the change) when the input value has changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant