Fork me on GitHub

Remove Range of Items Using API

<!-- Version 1: selecting items using jQuery -->
<script>
$('document').ready(function(){
	var $demo = $('#demo');
	
	//init jplist first time
	$demo.jplist({				
		itemsBox: '.list' 
		,itemPath: '.list-item' 
		,panelPath: '.jplist-panel'	
	});
	
	//remove items from jPList collection
   $demo.jplist({
		command: 'del'
		,commandData: {
			$items: $('.your-item-path')  //select your items using jQuery
		}
	});
	
});
</script>
                
<!-- Version 2: items are JS array -->
<script>
$('document').ready(function(){
	var $demo = $('#demo')
		,items = [];
		
	//first item
	items.push($('<div class="list-item box">\
		<div class="img left">\
			<img title="" alt="" src="../assets/img/thumbs/arch-1.jpg">\
		</div>\
		<div class="block right">\
			<p class="date">03/15/2012</p>\
			<p class="title">Arch 1</p>\
			<p class="desc">Test description 1</p>\
			<p class="like">6 Likes</p>\
			<p class="theme">\
				<span class="architecture">Architecture</span>\
			</p>\
		</div>\
	</div>'));
   //second item
	items.push($('<div class="list-item box">\
		<div class="img left">\
			<img title="" alt="" src="../assets/img/thumbs/arch-1.jpg">\
		</div>\
		<div class="block right">\
			<p class="date">03/15/2012</p>\
			<p class="title">Arch 2</p>\
			<p class="desc">Test description 2</p>\
			<p class="like">6 Likes</p>\
			<p class="theme">\
				<span class="architecture">Architecture</span>\
			</p>\
		</div>\
	</div>'));
   //third item
	items.push($('<div class="list-item box">\
		<div class="img left">\
			<img title="" alt="" src="../assets/img/thumbs/arch-1.jpg">\
		</div>\
		<div class="block right">\
			<p class="date">03/15/2012</p>\
			<p class="title">Arch 3</p>\
			<p class="desc">Test description 3</p>\
			<p class="like">6 Likes</p>\
			<p class="theme">\
				<span class="architecture">Architecture</span>\
			</p>\
		</div>\
	</div>'));
	
	//init jplist first time
	$demo.jplist({				
		itemsBox: '.list' 
		,itemPath: '.list-item' 
		,panelPath: '.jplist-panel'	
	});
	
	//remove items from jPList collection
	$demo.jplist({
		command: 'del'
		,commandData: {
			$items: items
		}
	});
	
});
</script>