filter() Jquery

filter() Jquery

  1. function unveil() {
  2.       var inview = images.filter(function() {   
  3.         var $e = $(this);
  4.         if ($e.is(":hidden")) return;

  5.         var wt = $w.scrollTop(),
  6.             wb = wt + $w.height(),
  7.             et = $e.offset().top,
  8.             eb = et + $e.height();

  9.         return eb >= wt - th && et <= wb + th; 
  10.       });


did't quite understand the usage of filter on the 2nd line . is it the Jquery filter function() ?? 

if it is , the filter function 1st take s a 'creteria' which i don't see being used here . 


also , the above code i got frm a small lightweight pluggin : called unviel.js , its for lazy loading . 

Github .