I have a table that contains a row that is hidden using the display: none when clicking a button So I want to show the line how can I do this?
& lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Button class = "shown" & gt; Show next row & lt; / Button & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; Tr style = "display: none" & gt; & Lt; Input type = "text" name = "input" /> & Lt; / TR & gt; & Lt; / Table & gt;
You can tie buttons and find it relatively, like this: Click
$ ("button.shownextrow") (function () {$ (this) .clostest ("tr"). Next (). Show ();});
This button ( $ (this)
) allows & lt; Tr & gt;
, then his brother & lt; Tr & gt; From
you may want to use it instead, but the rest are the same.
Note that you have & lt; Td> gt; & Lt; Td>
directly in
& lt; Tr & gt; & lt; Tr & gt;
to make it a valid demo
Comments
Post a Comment