diff --git a/README.md b/README.md index dc84c88..6ab56e0 100644 --- a/README.md +++ b/README.md @@ -176,9 +176,25 @@ Get the currently selected cover as a jQuery object. Get or set the current index. If no value is provided, the current index is returned. Otherwise, the index will be set to the provided value. -### **refresh** -Redraw the covers. You shouldn't ever need to do this unless you are adding -or removing covers or changing the covers yourself. +### **refresh** +Redraw the covers. You shouldn't ever need to do this unless you are adding +or removing covers or changing the covers yourself. + +When adding covers dynamically, append the new DOM node instead of rewriting +the coverflow's `innerHTML`. Rewriting `innerHTML` recreates every existing +node, which clears canvas-based reflections and discards plugin state. Apply +the reflection plugin to the new cover before refreshing: + +```js +var $cover = $('') + .appendTo('#preview-coverflow'); + +if ($.fn.reflect) { + $cover.reflect(); +} + +$('#preview-coverflow').coverflow('refresh'); +``` Events ------