Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L306 call function toggle() without a DOM element, but in toggle() you catch always $this.offset() of $this = $(this) which not exists. Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L83
You get this, when you close a tinycolorpicker popup with click on the website.
maybe change line 83 to position = $this.length ? $this.offset() : null, could be a solution or put var position in if (event) block, there you only need it.