2

i can simply remove checked checkboxes with this code

  $(".ImdbAddArtist:checked").slideUp('slow');

however, i cannot delete checkbox's texts

How can i do that ?

For example

   <input type="checkbox" value="1500-374-Tom Cruise" class="ImdbAddArtist" name="artist[]">Tom Cruise

for example, when i remove with this code

  $(".ImdbAddArtist:checked").slideUp('slow');

It only removes checkboxes.How can i remove also text? In example, it's Tom Cruise

4

1 回答 1

4

将其包裹在标签中。包装在标签中的好处是标签也可以点击。

<label id="myLabel"><input type="checkbox" value="1500-374-Tom Cruise" class="ImdbAddArtist" name="artist[]">Tom Cruise</label>
于 2012-04-30T09:36:02.460 回答