これを理解できないようです、私はここで愚かな何かを逃しているように感じます...
基本的に、削除リンクにカーソルを合わせると、その行にあるテキストを除いて、その行のすべてのテキストにラインスルーを実行しようとしています。<td>
<a class="remove">
基本的なhtml構造は次のとおりです。
<tr>
<td>Lorem ipsum text here</td>
<td>01/01/2012</td>
<!-- all <td>'s except for the Remove one should get a line-through -->
<td><a class="remove">Remove</a></td>
</tr>
jQuery:
$('tr').on({
'mouseover' : function () {
$(this).closest('tr').find('td').filter(function () {
var $childElems = $(this).children();
// I can see the <a class="remove"> in .children()
// But for some reason can't just test (hey there's an <a>,
// then don't apply this)
if ($childElems.find('a').length <= 0) {
return $(this).css('text-decoration', 'line-through');
}
});
},
'mouseout' : function () {
$(this).closest('tr').find('td')
.css('text-decoration', 'none');
}
}, 'a.remove');