Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 705 Bytes

constructor.md

File metadata and controls

19 lines (12 loc) · 705 Bytes

Cleave.js Documentation

Documentation > JavaScript API > Constructor

Constructor

new Cleave(selector|element, [options])

Creating an instance by providing an input field, it can be either HTML selector or the dom element.

The options is an object documented in the Options section.

With the instance created, you can call these Public methods.

var cleave = new Cleave('.my-input', {
    creditCard: true
});