auto_change_focus

1.0.0 • Public • Published

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>

Package Sidebar

Install

npm i auto_change_focus

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

11.3 kB

Total Files

7

Last publish

Collaborators

  • pieringro