Closed RomanBurunkov closed 7 years ago
LGTM, @pjona what do you think? :-)
@RomanBurunkov @RamonSmit maybe better solution is to give user some callback, so he can also use for example slideUp()
with his duration time. What you think about it?
@RomanBurunkov I can help you with it, but I need more time to prepare some example.
@pjona didn't think of that before. But that sounds like a good idea :+1:
@pjona, do you mean adding callback as a parameter during invoke remove method?
But we also can add some additional methods for hiding with my approach and also add time var...
Adding callback can be more comprehensive, but adding several hiding types and time variable is simplier to use:
$('#nest').nestable('remove', 'fade', 300);
$('#nest').nestable('remove', 'slide', 300);
//Use default time
$('#nest').nestable('remove', 'fade');
$('#nest').nestable('remove', 'slide');
or
$('#nest').nestable('remove', function(item){
....
});
Or we can add both options available and even default behavior defined at plugin initialization, which can be changed when invoking remove with parameters.
@pjona , @RamonSmit what do u think, guys?
@RomanBurunkov I think solution with 3 parameters fits enough:
$('#nest').nestable('remove', 'fade', 300);
$('#nest').nestable('remove', 'slide', 300);
This adds option 'fade' for remove method, which fadeOut an item before removing it from list.