But It works only for the âextraâ class and furthermore it opens all the extra not the first it find . I cannot use ids so I use class. Any idea? Thank you!
Are you sure itâs the next tr you want to find? (Hint: If iâm asking you this question, the answer to that is ânoâ, and you should look at your HTML structure againâŚ)
Hi @mspace, first of all note that your table cells donât add up correctly â you should add a colspan="3" to those âextraâ and ârepliesâ cells. Also, you might consider hiding the entire rows, not just the contained divs so that you donât have rows without any visible content⌠are you sure same-level table rows are appropriate here in the first place?
Anyway I would suggest to specify the toggle targets in a more generic manner that doesnât rely on a certain HTML structure, and chained next() calls that make it rather hard to comprehend which elements youâre trying to find; e.g. using data attributes:
Thank you for your reply. Now It opens first element from all links that I dynamically create. In every row I have an show extra and show repliesâŚhow I can triggered the corresponding row each time?
thank you again
Youâd also have to set the toggle-target and corresponding id dynamically then â e.g. by appending the item ID (if your items do have an ID of sorts), or just the iteration index otherwise.
Is this page somewhere online that we can see it? We may be able to give better solutions/corrections if we can see the output rather than the generator.