Skip to content

Commit

Permalink
Better use of jQuery selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Martín committed Dec 1, 2008
1 parent a41bc0c commit 835c98c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $.jlm.addComponent('sortable_list', {
});

$('.list-item .move-up, .list-item .move-down').click(function() {
move_item($(this).parent().parent().parent().parent(), this.value,
move_item($(this).parents('li:first'), this.value,
$(this).attr('class'));
return false;
});
Expand Down

1 comment on commit 835c98c

@klevo
Copy link

@klevo klevo commented on 835c98c Dec 5, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoaa, that’s it. This is exactly the thing I didn’t know how to do without parent().parent().parent() stuff.

Please sign in to comment.