claviska / jquery-minicolors

jQuery MiniColors Plugin
MIT License
960 stars 313 forks source link

Position failed #270

Closed 4URGB closed 5 years ago

4URGB commented 5 years ago

Hi,

first of all - great script!

I trie to work with it, but setting the position to another value failed.

<input data-position="bottom left" ...> - wont work

by ini the minicolors

position: $(this).attr('data-position') || 'bottom right',  - wont work too

Also i use

format: $(this).attr('data-format') || 'rgba',

and

<input data-format="rgba" ...>

but i received a hex value in the input field!?

It always display the left bottom classes.

What i do wrong?

claviska commented 5 years ago

Config via data attributes are not supported by minicolors unless you initialize it with them as in the demo:

https://github.com/claviska/jquery-minicolors/blob/master/index.html#L69-L77