How to change content of popup #1935
-
Hi, I have already initialized a popup with $(this).popup("change content",'<img id="preview_imagem" src="test.jpg" style="height:180px; width:180px;/>'); Console displays weird errors like: My code is provided below, and you can run it at http://quemfazsite.com.br/temp/teste.php
So how do I change the content of a popup? The docs at https://fomantic-ui.com/modules/popup.html#/usage says |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The |
Beta Was this translation helpful? Give feedback.
-
Wow that a great explanation! I thought that when I changed the content of the popup, even when it's not shown, it would still save the new content. So, in my case, I decided to change the |
Beta Was this translation helpful? Give feedback.
The
change content
behavior only changes the content while the popup is being displayed, but does not change it's initial value.To completely replace the popups content, just reinstantiate it again.
See https://jsfiddle.net/lubber/kqcfgs9t/19/