私はjQueryスクリプトをクリックしてリンクからURLを取得し、それを自分のビデオタグに挿入しようとしています。何かアドバイス?JQueryプル<a href
私は私が.html()から得たものをスプライシングしようとしましたが、引用符は常にそれをねじ込みます。
<div class="binShadow">
<div class="bin">
<table id="tableBin" border="0">
<tr>
<th>name</th>
<th>description</th>
<th>location</th>
<th>duration</th>
</tr>
<tbody>
<tr>
<td><a href='clip1234.mov'>Clip1234</a></td>
<td>dolor sit amet, consectetur adipiscing elit</td>
<td>dr101</td>
<td>:60</td>
</tr>
<tr>
<td><a href="clip456.mov">Clip456</a></td>
<td>Lorem ipsum dolor sit amet</td>
<td>dr101</td>
<td>:60</td>
</tr>
</tbody>
</div>
</table>
</div>
</div>
</div>
<script>
$("#tableBin").click(function() {
var url = $(this).html(); //Not even close to working
var overlay = jQuery('<div class="boxWrapper"><div class="box"><video src="'+url+'"</div></div>');
overlay.appendTo(document.body);
});
</script>
「説明」が含まれるセルをクリックするとどうなりますか? –