Guest User

Untitled

a guest
Sep 15th, 2016
93
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.         jQuery.ajax({
  13.             type: 'post',
  14.             dataType: "json",
  15.             url: 'data.json',
  16.             success: function (data) {
  17.                 //HOW TO CALL setFilter?
  18.                 pagePresets.prototype.setFilter.call('network', data.networks);
  19.             }
  20.         });
  21.     };
  22. }
  23.  
  24. pagePresets.prototype.setFilter = function (target, value) {
  25.  console.info(target + ' ' + value );
  26. }
Advertisement
Add Comment
Please, Sign In to add comment