我li
的列表中有很多元素,ul
如下所示:
<li id="filesOrderArray_dynamic_number>">
<a href="javascript:void(0)" class="remove_from_filestock">
<img src="ui_icons/cross-small.gif" title="Remove" rel="more_dynamic_numbers_here" />
</a>
<a href="javascript:void(0)" class="title_filestock">
<img src="ui_icons/properties-small.gif')?>" title="Properties" rel="more_dynamic_numbers_here" />
</a>
<a href="some_address" target="_blank" class="filestock_preview fancybox" rel="filestock">
Some Title
</a>
</li>
我有一个 jQuery 函数。当我单击同一标签内部时,我试图选择a.filestock_preview
文本。a.title_filestock
li
function title()
{
$('a.title_filestock').click(function(e) {
e.preventDefault();
var value = $(this).closest('a.filestock_preview').text(); alert(value);
});
}
title();