2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 12:55:12 +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) { validateOrientation: function(orientation, fallback) {
orientation = orientation.trim().toLowerCase(); orientation = $.trim(orientation || '').toLowerCase();
if(['auto', 'bottom', 'top'].indexOf(orientation) == '-1') if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){
orientation = fallback; orientation = fallback;
}
return orientation return orientation
}, },