title: select2: Is it possible to pass custom input and access it in methods
body: <p>I want to pass custom property while creating select2. Example (my custom property being <code>myFilterEnabled</code>):</p>
  
  <pre><code>$('#mySelId2').select2({
    myFilterEnabled: false, //Pass my initial state
    query: function(query) {
      var res = {
        results: CityFilter.cities
      };
      query.callback(res);
    }
  });
  </code></pre>
  
  <p>And use it in the query or render functions. Like:</p>
  
  <pre><code>$('#mySelId2').select2({
    myFilterEnabled: false,
    query: function(query) {
      var fltEnabled = this.myFilterEnabled; //Read current state
      var res = {
        results: fltEnabled ? [] : CityFilter.cities
      };
      query.callback(res);
    }
  });
  </code></pre>
  
  <p>This is so that, there is an initial state for the variable. But, it can change externally, and I want to check that state during each re-render/query.</p>
  
  <p><strong>Edit: Seems I made a mistake before posting. Above code seems to work. I am planning to add a common prefix like 'my' or 'myProj' so that it doesn't conflict with any variables of select2 itself.</strong></p>
  
  <p>Edit2: As mentioned, passing initial state and reading current state are working. I still need a way to change that state from outside. If select2 doesn't have a method for that I could set a data attribute on the element.</p>