私は次のhtmlを持っています
<a class="lid" id="1">
<div class="map_image">
<img width="220" height="145" alt="" src="photo.jpg" typeof="foaf:Image">
</div>
</a>
リンクのIDを取得するために次のjqueryを使用しています。
function onlid {
.setContent($(this).attr("id"));
}
$('.lid').on('mouseover', onlid);
この場合、クラスの蓋の id が 1 であるため、コンテンツは 1 に設定されます。
私が望むのは、html全体を取得して1の後に設定することです.
したがって、コンテンツは
1 <img width="220" height="145" alt="" src="photo.jpg" typeof="foaf:Image">
私は何かをしようとしています
.setContent($(this).attr("id") + $(this.map_image).html());
どんな助けでも大歓迎です。
ありがとう