1

How to remove checkbox from div using jQuery?

2 Answers 2

9

You can use .remove() in combination with a selector, like this:

$("#myDiv :checkbox").remove();

Which selector you'd use depends on your markup, you can read more on selectors here and here.

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

1 Comment

@sam - In that case you can do $("#checkboxid").remove() directly :)
1

You can also use animation, like fadeOut. It turns your page being more pleasent

$("#myDiv :checkbox").fadeOut('slow'); 

API Documentation

http://api.jquery.com/fadeOut/

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.