+
+
Please type a programing language like 'ActionScript', 'AppleScript', 'Asp', 'Basic', 'C', 'C++', 'Clojure', 'Cobol', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'Java', 'JavaScript', 'List', 'Perl', 'PHP', 'Ruby', 'Python', 'Scala', 'Scheme'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/uxrocket.autocomplete.js b/lib/uxrocket.autocomplete.js
index 6ae3d49..e633eb9 100644
--- a/lib/uxrocket.autocomplete.js
+++ b/lib/uxrocket.autocomplete.js
@@ -17,6 +17,7 @@
service : null,
minLength : 2,
formdata : null,
+ serialize : 'String', // String || Array || Object
categoryTextLimit: 25,
queryType : 'GET',
hidden : null,
@@ -213,7 +214,7 @@
}
if(_opts.formdata != null) {
- fdata = $(_opts.formdata).serialize();
+ fdata = _opts.serialize === 'String' ? $(_opts.formdata).serialize() : $(_opts.formdata)['serialize' + _opts.serialize]();
}
$.ajax({
@@ -416,6 +417,24 @@
return item;
};
+ $.fn.serializeObject = function() {
+ var _o = {},
+ _a = this.serializeArray();
+
+ $.each(_a, function() {
+ if(_o[this.name]) {
+ if(!_o[this.name].push) {
+ _o[this.name] = [_o[this.name]];
+ }
+ _o[this.name].push(this.value || '');
+ } else {
+ _o[this.name] = this.value || '';
+ }
+ });
+
+ return _o;
+ };
+
// global callback
var callback = function(fn) {
// if callback string is function call it directly
@@ -545,7 +564,7 @@
};
// version
- ux.version = '1.8.1';
+ ux.version = '1.8.2';
// settings
ux.settings = defaults;