HTML 代码如下所示:
<ul>
<li class="result">
<h3 class="title"><a class="someclass" href="url">Sometext</h3>
<cite class="url">Cite URL-1</cite>
</li>
<li class="result">
<h3 class="title"><a class="someclass" href="url-1">Some more text</h3>
<cite class="url">Cite URL-2</cite>
</li>
</ul>
我必须在点击 href 时获得引用值(引用 URL)。就像是:
$('a[class="someclass"]').mousedown(function() {
console.log($('cite').text()) //if first link clicked then Cite URL-1 should get returned
}
在这种情况下如何获取引用标签值?