mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-07-21 08:54:29 -06:00
Demo for support for custom container
This commit is contained in:
parent
57c19961fd
commit
5cfdd6bfa8
@ -83,6 +83,7 @@ positionCallback: function($elm) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
This callback is also good if you need to append your colorPicker to a different element then document.body. This way you can calculate the coordinates relative to the appended container...
|
||||||
|
|
||||||
The renderCallback can be used as openCallback and closeCallback:
|
The renderCallback can be used as openCallback and closeCallback:
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ $(function(){
|
|||||||
$window = $(window),
|
$window = $(window),
|
||||||
gap = this.color.options.gap; // this.color.options stores all options
|
gap = this.color.options.gap; // this.color.options stores all options
|
||||||
|
|
||||||
|
// _$UI.appendTo('#content-wrapper'); // demonstration only
|
||||||
|
|
||||||
return { // this demo is a copy of the internal usage (to show how it works);
|
return { // this demo is a copy of the internal usage (to show how it works);
|
||||||
'left': (_$UI._left = position.left) -
|
'left': (_$UI._left = position.left) -
|
||||||
((_$UI._left += _$UI._width -
|
((_$UI._left += _$UI._width -
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
margin: 5px 0 0;
|
margin: 5px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content-wrapper {
|
||||||
|
/* position: relative; */
|
||||||
|
}
|
||||||
|
|
||||||
.cp-color-picker:after,
|
.cp-color-picker:after,
|
||||||
.cp-color-picker:before {
|
.cp-color-picker:before {
|
||||||
content: "";
|
content: "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user