Modify ↓
Ticket #7482 (closed bug: patchwelcome)
.html() does not work when <input type="text"> is updated
| Reported by: | kiphughes@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.5 |
| Component: | attributes | Version: | 1.4.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
This should explain it all. Look at the alert, it's not displaying what is expected.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

When you set the value of an input element using .val() (or elem.value), you are updating a DOM property, not an HTML attribute. This issue comes up frequently. As to just why .val() is so anomalous, I cannot provide a great answer at the moment. I am not sure if this is something that is "fixable" with jQuery or if it is an issue inherent to this particular property. Perhaps someone else can provide some illumination?