-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy the functionality of outerHTML #54
Comments
You can use |
The thing is, I'm using it inside an each function, like this: $(element).each(function(index, elem) { And in that case, it gives back the equivalent to innerHTML. I suppose this is because elem is a Cheerio Object instead of a string indicating the element. But I can't find how to manipulate this element to get the outer HTML. Thanks! |
Oh okay, so you'll want to do something like this:
Keep in mind cheerio is try to emulate jQuery as close as possible so |
Now I get it :P Thanks a lot for your help! |
I'm using cheerio on my node.js server, and using the method html() I can copy the functionality of innerHTML, but I haven't found a way to copy how outerHTML works. How could I do this?
Thanks :)
The text was updated successfully, but these errors were encountered: