Posted By

lewiswalsh on 08/22/11


Tagged

javascript jquery truncate slice


Versions (?)

Truncating or removing a block of elements from a collection of elements (such as a list)


 / Published in: jQuery
 

By omitting [end] it will remove all to the end. Set an [end] with a negative value to count back from the end of the elements. fadeOut is unnecessary.

  1. $('ul li').slice(start, [end]).fadeOut('slow').remove();

Report this snippet  

You need to login to post a comment.