.children()
一部のjQuery関数で使用しすぎているように感じます。
これが私のHTMLです:
<div class="goal-small-container">
<div class="goal-content">
<div class="goal-row">
<span class="goal-actions">
そしてこれが私のjQueryです:
$('.goal-small-container').hover(function() {
$(this).children('.goal-content').children('.goal-row').children('.goal-actions').css({visibility: "visible"});
}, function () {
$(this).children('.goal-content').children('.goal-row').children('.goal-actions').css({visibility: "hidden"});
});
もっと良い方法はありますか?jQuery関数で使用する子の数を減らすにはどうすればよいですか?