Skip to main content
4 votes
Accepted

Backbone.js dynamic table

As this question was asked nearly four years ago it is likely the case that you have learned more about JavaScript since then and/or changed this code. Nonetheless perhaps the info below will help you ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes
Accepted

Selectable date filters

jQuery Your code uses jQuery, but you don't seem to be using any features of jQuery that offer any advantages over the DOM - unless you need to target older browsers you can remove your jQuery ...
Dai's user avatar
  • 195
2 votes

Selectable date filters

As jQuery is loaded, why not taking advantage of it. This will make the code short. In the OP code, Vanilla JS is used and that object is wrapped in jQuery which is not necessary. Just use jQuery with ...
Tushar's user avatar
  • 3,002
1 vote

Selectable date filters

Good question, there is so much repetition in there, violating the DRY principle. I think the first thing is that you apply a number of things to both date1 and <...
konijn's user avatar
  • 33.2k
1 vote

Selectable date filters

1. Combining JQuery Selectors Jquery can select multiple items at once as you can with css selectors. This can cut out some duplication. 2. Using Switches instead of if-else chains Switches are a ...
kharenis's user avatar
1 vote

Backbone view that "starts" the application

You should shorten this up if (pub_req) { Page.flip('splash'); } else if (!token) { Page.flip('splash'); } else { this.loadViews(token); } by merging ...
Malachi's user avatar
  • 28.6k
1 vote
Accepted

Shipping calculator consisting of one field

Getting rid of backbone, you can simplify this a lot. HTML ...
Jonah's user avatar
  • 4,340
1 vote

Backbone subviews and switch

I am glad that you are following conventions. That way is really simple to hack the code in order to shorten it. All you have to do is to create the right View instance and all the remaining code is ...
Bruno Costa's user avatar
  • 5,566
1 vote
Accepted

Secret Santa Application : Practical Interview Test

If I was evaluating this code as a sample for an interview, I might be deterred by the inconsistent indentation - some blocks are indented with two spaces while others have four spaces. I do like the ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
1 vote

Managing collection views, adding/removing views, and listening for events

I think there is a lot of duplication in your code: App.Collections.Movies and App.Collections.Watchlist have the exact same ...
76484's user avatar
  • 191

Only top scored, non community-wiki answers of a minimum length are eligible