2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-09 14:50:57 +00:00

Use jQuery's trim and inArray so it works in IE8. Fixes #226

This commit is contained in:
Tomas Kirda 2014-08-24 18:21:54 -05:00
parent 3e7fb81cf3
commit cf80d8e67b

View File

@ -723,9 +723,10 @@
},
validateOrientation: function(orientation, fallback) {
orientation = orientation.trim().toLowerCase();
if(['auto', 'bottom', 'top'].indexOf(orientation) == '-1')
orientation = $.trim(orientation || '').toLowerCase();
if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){
orientation = fallback;
}
return orientation
},