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


/ Published in: jQuery
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. $('ul li').slice(start, [end]).fadeOut('slow').remove();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.