1.0.0 • Published 4 years ago

auto_change_focus v1.0.0

Weekly downloads
3
License
-
Repository
github
Last release
4 years ago

Auto Change Focus

A chain of text inputs that automatically changes focus to the next one as soon as the last character has been typed in the previous.

Usage

Read demo/index.html

<div id="example2"></div>

<script>
$(document).ready( function(){
    $('#example2').autoChangeFocus({
        inputsList: [
            {
                id: 'example2id0',
                maxLength: 3,
                checkKeyPressed: function (event) {
                    if (isNaN(event.key)) {
                        return false;
                    }
                    return true;
                }
            },
            {
                id: 'example2id1',
                maxLength: 5
            },
        ],
    });
});
</script>