fancybox
fancybox copied to clipboard
Text is reset in my textarea
Hello! I ask for help. I did a custom scan on this sample https://codepen.io/fancyapps/full/zPZeKb
Instead of text, I added a textarea. Now if I change the text in the field, then scrolling to the next photo and returning to the original one, the text is reset - it becomes the same as it was originally. I tried to assign it via javascript, but this did not work. Please, help!
It was not easy, but I solved my question. Maybe someone will come in handy. For textarea, I set the change event onclick. Change function calls
$.fancybox.getInstance().current.opts.caption = 'new caption'; $.fancybox.getInstance().updateControls();