1
0
mirror of synced 2024-11-22 04:56:08 +03:00
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
Go to file
Alexander Pepper 0d98ea03af Adds an additional parameter roundtripValue to function data.
Enables a stored value, which can be passed by the function 'result' to the next call of the function 'data'.

This is a solution for issue #72

Example:

    data: function (term, page, roundtripValue) {
      var options = {
        q: term,
        limit: 5,
      };
      if (typeof(roundtripValue) !== 'undefined' && roundtripValue != null) {
        options['continuation_handle'] = roundtripValue;
      }
      return options;
    },
    results: function (data, page) {
      var roundtripValue = data.continuation_handle;
      var more = typeof(roundtripValue) !== 'undefined';
      return {results: data.results, more: more, roundtripValue: roundtripValue};
    },

Signed-off-by: Igor Vaynberg <igor.vaynberg@gmail.com>
2012-06-04 16:46:23 -07:00
LICENSE build script 2012-05-16 10:36:28 -07:00
README.md license tweaks 2012-05-03 09:01:13 -07:00
release.sh tweaked release script a bit 2012-05-16 10:54:22 -07:00
select2.css build script 2012-05-16 10:36:28 -07:00
select2.js Adds an additional parameter roundtripValue to function data. 2012-06-04 16:46:23 -07:00
select2.png initial checkin 2012-03-04 10:58:26 -08:00
spinner.gif initial checkin 2012-03-04 10:58:26 -08:00

Select2

Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. Look and feel of Select2 is based on the excellent Chosen library.

To get started -- checkout http://ivaynberg.github.com/select2!

Bug tracker

Have a bug? Please create an issue here on GitHub!

https://github.com/ivaynberg/select2/issues

Mailing list

Have a question? Ask on our mailing list!

select2@googlegroups.com

https://groups.google.com/d/forum/select2

Copyright 2012 Igor Vaynberg

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.