Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Javascript
- $('content').set('html','<ul id="item-list"><li></li></ul>');
- alert(result.items.length); // always bigger than zero :)
- $('item-list').render(result,{
- 'li':{'item<-items':{
- '.':'item.title'
- }
- }
- });
- // in pure.js I've added simple alert in render function
- function render(ctxt, directive){
- alert(this.length);
- var fn = typeof directive === 'function' && directive, i = 0, ii = this.length;
- for(; i < ii; i++){
- this[i] = replaceWith( this[i], (fn || plugins.compile( directive, false, this[i] ))( ctxt, false ));
- }
- context = null;
- return this;
- }
- //and it alerts always undefined in Firefox & Safari
Add Comment
Please, Sign In to add comment