bgrins / spectrum

The No Hassle JavaScript Colorpicker

Home Page:https://bgrins.github.io/spectrum/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Events Don't Work

jwbats opened this issue · comments

The change event in this code does not get called:

	$('input.designer_ColorPicker').spectrum({
		flat:true,
		showInitial:false,
		showButtons:false,
		showAlpha:true,
		clickoutFiresChange: true,
		showInput: true,
		preferredFormat: 'rgb',
		change: function(color) {
			debugger; // never hit
			console.log(color.toHexString()); // never logs
		}
	});

The documentation provides an alternative way of setting event listeners with jquery. This also does not work.

My bad entirely. I was using the 'change' event when I actually needed the 'move' event. Never mind.