I am trying to attach a JQuery color picker plug-in to a textbox. The same code works in IE 6 & 7 but does not in FireFox. I see no errors or warnings of any sort it feels as if the plugin code is just being ignored.
<script src="/colorpicker.js" type="text/javascript"></script>
<script type="text/jscript">
jQuery(function() {
$('#TextColor').ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();
//sets bg color of prev div
$('#' + el.id + 'Prev').css('backgroundColor', '#' + hex);
},
onShow: function(colpkr) {
$(colpkr).fadeIn(500);
return false;
},
onHide: function(colpkr) {
$(colpkr).fadeOut(500);
return false;
},
onBeforeShow: function() {
$(this).ColorPickerSetColor(this.value);
}
})
.bind('keyup', function() {
$(this).ColorPickerSetColor(this.value);
});
});
</script>
The current scripts are placed at the bottom of the page but I have tried loading the plug-in code at the top and the setup code at the bottom. All suggestions are welcome.