Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Object to HTML? Re: jQuery Object to HTML?

#110970
jacorre
Participant

.html() only seems to work on an element that contains the divs I want to grab. I don’t have a containing element except body and I don’t want to grab ALL of the html in body.

So I use find to grab all the divs with a class of findme. That results in one object with the divs inside.

What I’m really looking to do with that is save it to local storage. Then when the page loads again, load what’s in local storage, which needs to be all the html, not an object.

So my problem is that when I append to the body, the result I’m getting is Object, not the actual html.

I’m wondering if I have to convert the object to a string?