I want to achieve this :
My code is as follows :
$(".ui-slider-handle").click(function(e){
$("#colorpickerDiv").css({"left":e.pageX,"top":e.pageY});
$("#colorpickerDiv").spectrum("show");
});
$("body").click(function(){
$("#colorpickerDiv").spectrum("hide");
});
author of the plugin here.
Here is a working example of what I think you are looking for: http://jsfiddle.net/bgrins/FLBQW/. Your problem may have been caused by an issue from an earlier version, but if you are still having problems and can post a test case on jsFiddle, we should be able to figure it out.