I have...
<td align="right" vAlign="top">
<img src="test/test.gif" width="1" height="4" border="0"><br />
Number<font color="#CC0000">*</font>:
</td><td></td><td>
How do I ditch that hanging <br />
with jquery? I've tried a ton of examples here ,but nothing works. Any ideas?
Create Dynamic Controlsappend() event with the control in which you want to add some dynamic controls and in that append event you need to write the HTML code similar to what you might have written in the body section and this will work for you, for example: <script> $(document). ready(function () {
jQuery example to dynamically add a div on page In this example, we have a div with id board and a button to add new divs into this board. In $(document). ready() we have bound an event listener to click event, which means when the user will click on this button, new divs will be created and added into the board.
Have you tried this?
$("img").next("br").remove();
Assuming you want to remove all <br>
that follow an <img>
you can use this:
$('img + br').remove()
If you prefer it to apply only to those inside a <td>
:
$('td > img + br').remove()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With