I want to get data of li using checkbox. in my code you can see checkboxes and list of songs ... i want when checkbox is checked and click on button .get all the checked li attr.
using jquery, when user checked checkboxes and click on button. i want to get
- attr as like song , cover and artist.
as same like this site
<table>
<ul id="playlist" class="hidden">
<tr>
<td><input type="checkbox" value="check_1" name="check_1" id="check_1"></td>
<td><li id="songlist" song="Bhai Nirmal Singh Ji - Apne Har Peh Benti.mp3" cover="cover1.jpg" artist="Linkin Park">Bhai Nirmal Singh Ji - Apne Har Peh Benti.mp3</li></td>
<td><a href="" id="add">Add to Cart</a></td>
</tr>
<tr>
<td><input type="checkbox" value="check" name="check"></td>
<td><li id="songlist" song="Linkin Park - One Step Closer.mp3" cover="cover1.jpg" artist="Linkin Park">One Step Closer.mp3</li></td>
<td><a href="" id="add">Add to Cart</a></td>
</tr>
<tr>
<td><input type="checkbox" value="check" name="check"></td>
<td><li song="Linkin Park - With You.mp3" cover="cover1.jpg" artist="Linkin Park">With You.mp3</li></td>
<td><a href="">Add to Cart</a></td>
</tr>
<tr>
<td><input type="checkbox" value="check" name="check"></td>
<td><li song="Linkin Park - Points Of Authority.mp3" cover="cover1.jpg" artist="Linkin Park">Points Of Authority.mp3</li></td>
<td><a href="">Add to Cart</a></td>
</tr>
<tr>
<td><input type="checkbox" value="check" name="check"></td>
<td><li song="Linkin Park - Crawling.mp3" cover="cover1.jpg" artist="Linkin Park">Crawling.mp3</li></td>
<td><a href="">Add to Cart</a></td>
</tr>
<tr>
<td><input type="checkbox" value="check" name="check"></td>
<td><li song="Linkin Park - Runaway.mp3" cover="cover1.jpg" artist="Linkin Park">Runaway.mp3</li></td>
<td><a href="">Add to Cart</a></td>
</tr>
</ul>
</table>
Aucun commentaire:
Enregistrer un commentaire