I have the following HTML:
<div class="rep_tr0" id="row_2">
There is only one instance of a div with this id. How can I remove it with jQuery? I found the following code but I am not sure how to apply this:
$('.widgets').find(rowId).remove();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Grab by its id and then call remove.
The code you found is very similar. This says:
As rowId is a variable here (no quotes around it), I don’t know what the intention was from the person you found it from. But it needs to be a selector that jQuery can parse. Like
#for an id or.for a class.