Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14220 closed bug (notabug)

html() method dropping <li> tags

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.3
Keywords: Cc:
Blocked by: Blocking:


JS fiddle: http://jsfiddle.net/stefek99/a2Zyc/

I have a template. I create jQuery object out the string. I html() the jQury object The output html does not contain <li> tags.

Bug or feature?

Versions: tried on all versions available on jsfiddle:

Change History (2)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

.html() is equivalent to the DOM .innerHTML and doesn't include the element upon which the method/property is called. Ask for help on a forum.

comment:2 Changed 10 years ago by anonymous

Thank you for clarification, makes perfect sense: http://jquery-howto.blogspot.co.uk/2009/02/how-to-get-full-html-string-including.html

you should surround your markup with some dummy div
Note: See TracTickets for help on using tickets.