Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 69
  • Last Modified:

[object][object]

Please see fiddle below.

How come the cloned elements are showing as [object][object]?

http://jsfiddle.net/isogunro/vj5489ye/1/
0
Isaac
Asked:
Isaac
1 Solution
 
E-RiskCommented:
Are you trying to clone the dropdown or list the items in the dropdown?
I think the issue is putting a dropdown in an unordered list.

Check the fiddle I modified.
http://jsfiddle.net/cr0874/vj5489ye/9/
0
 
Rainer JeschorCommented:
Hi,
because the clone function returns the cloned jQuery object. Simply append a ".html()" to the object like
$("#tabs").prepend("<ul id='tabIndex'><li>" + copyFilterBy.html() + "</li></ul>");

Open in new window

and you get the html code of your cloned jQuery object.
(or if you use .text the text content stripped of any HTML tags)

HTH
Rainer
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
Thanks Rainer! That worked.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now