私はたくさんのサムネイルを持っています。これらのうち、私link
は自分の JQuery スクリプトで を知っていますが、 から HTML を取得する必要がありますが、.caption
そうすることができません。
私は次のことを試しました
$('a.thumbnail').click(function() {
$(this).closest('.caption').html()
$(this).find('.caption').html()
$(this).children('.caption').html()
});
HTMLは次のとおりです。
<div class="thumbnail">
<a href="#" class="thumbnail">
<img src="{{ URL::asset($item->image) }}" alt="">
</a>
<div class="caption" align="center">
{{ $item->name }}
</div>
</div>