7

how can i append a div directly to the window object?

<html>
<head>
</head>
      <body>
           <div><div>
           <ul>..</ul>
      </body>
</html>

and i want to append an element after the ul, but not something like $('ul').after(element), i just want to append it directly to body. thanks

1 Answer 1

8

$("body").append(element); or $(element).appendTo("body");

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.