jeudi 22 janvier 2015

Ember spectrum color picker (change background)

I am strulling for a while to make this component working: http://ift.tt/1t2nPZA


Code so far:



import SpectrumColorPickerComponent from 'ember-spectrum-color-picker/components/spectrum-color-picker';

export default SpectrumColorPickerComponent.extend({
showInitial: true,
moveFiresChange: true,
showAlpha: true,
showInput: true,
move: function(color){
$('#result').css('background-color',color.toRgbString());
}
});

<div id="result">Lorem dipsum lalala</div>
Achtergrondkleur {{spectrum-color-picker color=result}}


How could I make this work? Fiddle: http://ift.tt/1wqfyK4





Aucun commentaire:

Enregistrer un commentaire