Permalink
Browse files

In a filter directive, set the 'this' object to the current loop item

  • Loading branch information...
1 parent ba469d7 commit ce5c264a59e8a9a2a44b1cdbea9c7630fc8d11e9 @pure committed Sep 22, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 index.html
  2. +2 −2 libs/pure.js
  3. +2 −2 libs/pure_packed.js
View
@@ -8,7 +8,7 @@
<!--JSON needed to show the source code only -->
<script src="libs/json2.js"></script>
- <script src="libs/pure.js"></script>
+ <script src="libs/pure_packed.js"></script>
<!-- Example page files -->
<script src="js/index.js"></script>
View
@@ -7,7 +7,7 @@
Copyright (c) 2010 Michael Cvilic - BeeBole.com
Thanks to Rog Peppe for the functional JS jump
- revision: 2.49
+ revision: 2.50
*/
var $p, pure = $p = function(){
@@ -363,7 +363,7 @@ $p.core = function(sel, ctxt, plugins){
//if array, set a length property - filtered items
typeof len !== 'undefined' && (ctxt.length = len);
//if filter directive
- if(typeof ftr === 'function' && ftr(ctxt) === false){
+ if(typeof ftr === 'function' && ftr.call(ctxt.item, ctxt) === false){
filtered++;
return;
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit ce5c264

Please sign in to comment.