I want to be able to hide all elements which have an ALT value of 3 using jquery.
hide all elements with attribute alt="3"
Is this possible? And if so, how can it be done?
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.
Try this:
It uses the attribute selector to match elements where
althas a value of3.hide(), obviously, hides all matched elements. To narrow the selector down (and make it a bit faster), you can always add the tag name as usual:For dynamic values, you can use ordinary string concatenation: