On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic<trivu...@gmail.com> wrote: > I can success print ui.draggable to console, but how to convert it to > string? > I need to write it into some element with .innerHTML and I will > probably use it in "for" loop...
I think you are trying the hard way. ui.draggable is not a string, but a jQuery element. Use that as you see fit. For Hangman you're probably looking to copy either the text ( ui.draggable.text() ) or the html itself ( ui.draggable.html() ). If you need to clone the source you want ui.draggable.clone() (note that any events bound to the original are not bound to the clone unless you use live() ) Trying to convert a jQuery element to a string doesn't make sense unless you say what "string" you want - the text, the html, the id, these are all different strings. -- Brett Ritter / SwiftOne swift...@swiftone.org