ソースを参照

Allow to pass a callback as ajax.url

Frédéric Camblor 12 年 前
コミット
a770ade670
1 ファイル変更1 行追加1 行削除
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -316,7 +316,7 @@ the specific language governing permissions and limitations under the Apache Lic
                 if( null !== handler) { handler.abort(); }
 
                 handler = transport.call(null, {
-                    url: options.url,
+                    url: ((typeof options.url === 'function')?options.url():options.url),
                     dataType: options.dataType,
                     data: data,
                     type: type,