<td id="valhisprofitVal"><%= Math.Round(profit, 5) %>%</td>
These rows are added dynamically, so there can be multiple rows with the same Id.
How do I hide all of them using Jquery?
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.
You can’t. Only one element can have its own ID, you can’t share the same ID among multiple elements. And because of that, if you try to use JavaScript to find elements with the same ID, you’ll only obtain the first of those elements.
Use a class instead:
Then in jQuery, select the class: