$("#picker").spectrum({ color: "#f00"//, /*move: function(evt, tinycolor) { console.log(['move()', tinycolor]); }, show: function(evt, tinycolor) { console.log(['show()', tinycolor]); }, hide: function(evt, tinycolor) { console.log(['hide()', tinycolor]); }, beforeShow: function(evt, tinycolor) { console.log(['console()', tinycolor]); },*/ }); var throttled = _.throttle(test, 125); function test(evt, tinycolor) { console.log(['move()', evt, tinycolor]); } $("#picker").on('move.spectrum', function(evt, tinycolor) { throttled(evt, tinycolor) }); $("#picker").on('show.spectrum', function(evt, tinycolor) { console.log(['show()', evt, tinycolor]); }); $("#picker").on('hide.spectrum', function(evt, tinycolor) { console.log(['hide()', evt, tinycolor]); }); $("#picker").on('beforeShow.spectrum', function(evt, tinycolor) { console.log(['beforeShow()', evt, tinycolor]); });
<input type='text' id="picker" />