简体   繁体   中英

config options in complete.ly.js

What are the possible values for the configuration options when creating an instance of complete.ly ?

My code is like this:

   var pv = completely(document.getElementById('container'));

as seen in the booking example: http://complete-ly.appspot.com/examples/booking.html

However the API doc http://complete-ly.appspot.com/index.html#API says something about a config object ?

It looks like this is not documented anywhere. Yet, looking at the source code it appears you have a small set of options to perform minor cosmetic customizations:

Taken from the source code:

function completely(container, config) {
    config = config || {};
    config.fontSize =                       config.fontSize   || '16px';
    config.fontFamily =                     config.fontFamily || 'sans-serif';
    config.promptInnerHTML =                config.promptInnerHTML || ''; 
    config.color =                          config.color || '#333';
    config.hintColor =                      config.hintColor || '#aaa';
    config.backgroundColor =                config.backgroundColor || '#fff';
    config.dropDownBorderColor =            config.dropDownBorderColor || '#aaa';
    config.dropDownZIndex =                 config.dropDownZIndex || '100'; 
    config.dropDownOnHoverBackgroundColor = config.dropDownOnHoverBackgroundColor || '#ddd';

However, it's worth nothing that you can access any of the HTML wrapped elements so you could just do anything yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM