I have a div with two classes added to it , now i want to completely hide this div(and this div doesn’t have any id).
for e.g.
<div class="class1 class2">
Hello!!
</div>
Can anyone please suggest how this can be achieved?
Thanks
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.
That’s pretty easy:
$('div.class1.class2').hide();Note that it will select all matching divs. If you only want to select a single one you need to use a more specific selector or an ID.