mixinmax / jquery.swatches

A jQuery plugin that turns a one-line div into a sweet color swatch
http://maxmackie.github.io/jquery.swatches/
243 stars 26 forks source link

Check data-colors #8

Closed bhoodream closed 11 years ago

bhoodream commented 11 years ago

Hi, I think, You should check value of data-colors, because it can be an array...

mixinmax commented 11 years ago

Hey @bhoodream can you give an example of how the data-colors attribute could be an array. I tried it locally and couldn't get anything to work.

bhoodream commented 11 years ago

var arr = [1,2,3], swatch = $('.swatch'); swatch.data('colors', arr); console.log(typeof swatch.data('colors'));

mixinmax commented 11 years ago

Ahh, that makes more sense. Love it.