Opened 14 years ago
Closed 14 years ago
#3252 closed bug (duplicate)
html() is inconsistent in its behavior
Reported by: | skorpan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | html, inconsistency | Cc: | |
Blocked by: | Blocking: |
Description
$('span').html(1) sets the HTML content to "1", even though 1 is not a string. However, $('span').html(0) only empties the contents of the matched elements. Of course, html() is said to want a string for input, but it should at least be consistent in its behavior. I'd expect .html(0) to do about the same thing as .innerHTML = 0.
Note: See
TracTickets for help on using
tickets.
Duplicated of (fixed) #3053.