Skip to main content

Bug Tracker

Side navigation

#3252 closed bug (duplicate)

Opened August 14, 2008 09:39AM UTC

Closed August 14, 2008 02:11PM UTC

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.

Attachments (0)
Change History (1)

Changed August 14, 2008 02:11PM UTC by flesler comment:1

resolution: → duplicate
status: newclosed

Duplicated of (fixed) #3053.