Guest User

Untitled

a guest
Sep 15th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pagePresets() {
  2.     this.loading = true;
  3.     this.isLoading = function () {
  4.         return this.loading;
  5.     };
  6.     this.setLoading = function (state) {
  7.         this.loading = state;
  8.         return;
  9.     };
  10.     /** this function loads saved filters */
  11.     this._loadFilters = function() {
  12.         var self = this;
  13.         jQuery.ajax({
  14.             type: 'post',
  15.             dataType: "json",
  16.             url: 'data.json',
  17.             success: function (data) {
  18.                 //HOW TO CALL setFilter?
  19.                 self.setFilter.call('network', data.networks);
  20.             }
  21.         });
  22.     };
  23. }
  24.  
  25. pagePresets.prototype.setFilter = function (target, value) {
  26.  console.info(target + ' ' + value );
  27. }
Advertisement
Add Comment
Please, Sign In to add comment