underscore.js
Filtering a Backbone Collection returns an array of Models
Sample Code: this.books = this.getBooksFromDatabase(); this.publishedBooks = this.books.filter(function(book) {[详细]
2023-03-14 00:35 分类:问答Javascript array containing object logic failing. What is going wrong?
I have two arrays, one of the arrays holds all the unique values of another array. The second array holds the unique values of the duplicate values found of another array.[详细]
2023-03-11 12:49 分类:问答how to search through a json response and compare a variable to existing key - value and get results of a different key - value
I want to display a polygon in a bing map. I\'ve got this part down. I\'m wondering how I would go about accessing a value from a different key in my json response once I\'ve identified which key\'s s[详细]
2023-03-10 01:01 分类:问答why do bindAll in backbone.js views?
In backbone\'s todo demo the code has a few spots where _.bindAll(this,...) is used. Specifically it\'s used in the initialize function of both views. As far as I can tell it\'s necessary to do th开发[详细]
2023-03-07 22:00 分类:问答Make a simple search algorithm more elegant
// temp data var array = [1,2,function() { }, 3, function() { }]; var cb = function() { console.log(\"foo\"); }[详细]
2023-03-06 19:58 分类:问答jquery/javascript - overwriting values that exist
I have something similar to this: ... meta: { \'orderby\' : \'firstname\', \'page\' : 1, \'per\' : 10 } ... When I get send the request using ajax, part of my response contains some of this meta da[详细]
2023-03-02 16:03 分类:问答backbone.js - controller properties from a view
I have a controller property called authenticated which defaults to false. However, in my login view I need to be able to set it to true. Also, in my logout view I need to be able to set it to false.[详细]
2023-03-01 12:16 分类:问答javascript find objects based on search terms
I need to search an array of objects with an object of se开发者_开发知识库arch terms and get the index of results in an array.[详细]
2023-02-27 06:49 分类:问答backbone.js - events only firing once
My events aren\'t working as I\'d hoped, and I think I know why. When the perpage span is clicked, everything renders correctly. But I realized - maybe the events aren\'t reattached to the new markup?[详细]
2023-02-25 18:09 分类:问答backbone.js - rendering view
My ListClass looks like this: var ListView = Backbone.View.extend({ initialize: function() { this.render();[详细]
2023-02-25 16:35 分类:问答