Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. //Collections
  2. var Topics = Backbone.Collection.extend({
  3. model: TopicStruct,
  4.  
  5. initialize: function(){
  6. console.log('Collector Responding!');
  7. },
  8.  
  9. url: 'http://dev-sw-budget.gotpantheon.com/sort-coordinator-json',
  10.  
  11. render: function(){
  12. console.log('Topics Render Responding!');
  13. },
  14.  
  15. });
  16.  
  17. $(document).ready(
  18. function(){
  19. console.log('--- DOM Ready!');
  20. var topics = new Topics();
  21. var topicsView = new TopicsList({collection: topics});
  22. topics.fetch({reset: true});
  23.  
  24. $('#data table').append(topicsView.el);
  25. }
  26. );
  27.  
  28. var topics = new Topics();
  29. topics.fetch();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement