Help with filtering content!
I am attempting to filter content using multiple class names, but I can't seem to be able to get the content to be filtered based on their class names. Here's the code I have so far:
- $(document).ready(function(){
$('#sorter a').click(function(e){
var sortName = $(this).text().toLowerCase().replace(' ','-');
if(sortName === 'all-images') {
$('#photorow1 li').show().removeClass('hidden');
} else {
$('#photorow1 li').filter(sortName).show().removeClass('hidden')
.end().not(sortName).hide().addClass('hidden');
}
e.preventDefault();
});
});
Any help would be greatly appreciated!!