Skip to content

Instantly share code, notes, and snippets.

@eirikb
Created September 27, 2012 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eirikb/3792439 to your computer and use it in GitHub Desktop.
Save eirikb/3792439 to your computer and use it in GitHub Desktop.
Filtering SharePoint Note Board
$(function() {
$('.ms-socialCommentEdit').each(function() {
var $wp = $(this).closest('[webpartid]');
var $search = $('<input>').keyup(function() {
$wp.find('.ms-socialCommentItem').hide();
$wp.find('.ms-socialCommentItem').filter(function() {
return $(this).find('.socialcomment-contents').text().toLowerCase().indexOf($search.val().toLowerCase()) >= 0;
}).show();
});
$wp.prepend($search);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment