Skip to content Skip to sidebar Skip to footer

Detecting And Disabling Autocompletion On Mobile Devices With Either Complete.ly Or Typeahead

In my project I want to use either complete.ly (see http://complete-ly.appspot.com ) or typeahead.js (see http://twitter.github.io/typeahead.js/) As far as I know, none of the

Solution 1:

First you should find a way to determine if you are running on the mobile or not.

see: Detecting a mobile browser

For complete.ly you could do something like this:

if (typeofwindow.orientation !== 'undefined') { 
    // mobile.var input = document.createElement('input');
    input.type = 'text'
    ...
    document.getElementById('container').appendChild(input);
    ... 
} else {
    var completely = document.getElementById('container'); 
    ...
    ...
}

arguably this could be handled by complete.ly itself.

Post a Comment for "Detecting And Disabling Autocompletion On Mobile Devices With Either Complete.ly Or Typeahead"