Migration from V3 to V4 #63
ephenyxshop
started this conversation in
General
Replies: 2 comments 1 reply
-
Hi, You have to use <div id="addAccountArea">
<p>
<input name="sample" type="text" value="" />
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut semper, justo eget vehicula vestibulum, enim enim suscipit lectus, et sagittis nibh risus vel metus. Quisque eu ornare ante, et gravida mauris. Vivamus massa justo, sagittis non viverra sed, sodales non nisi. Nunc semper, massa a aliquet dictum, enim nisi malesuada orci, et elementum lectus turpis et velit. Nam vel felis vitae tortor dignissim malesuada. Nam suscipit, justo eu elementum pulvinar, magna sem tempor ex, vitae iaculis tellus odio non nisl. Duis dolor orci, viverra ut finibus sed, aliquet vitae tortor. Proin sodales ipsum ac ipsum hendrerit tempus.
</p>
</div>
<p>
Display cloned element <br />
<button id="demo1">#1 Demo</button>
<button id="demo2">#2 Demo</button>
</p>
<p>
Preserve changes <br />
<button id="demo3">#3 Demo</button>
</p> document.getElementById('demo1').addEventListener('click', () => {
Fancybox.show([
{
html : document.getElementById('addAccountArea').cloneNode(true)
}
]);
});
document.getElementById('demo2').addEventListener('click', () => {
Fancybox.show([
{
src : "#addAccountArea",
type : "clone"
}
]);
});
document.getElementById('demo3').addEventListener('click', () => {
Fancybox.show([
{
src : "#addAccountArea",
type : "inline"
}
]);
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
One thing I would like to add that the author didn't address is the
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I have been trying differnet option to migrate from v3 to v4; without any success, I essentially use fancybox for html content, I use for example on a success ajax request the following code :
success: function (data) {
$('#addAccountArea').html(data.html);
$.fancybox.open($('#addAccountArea'), {
touch: false,
clickContent: false,
clickSlide: false
});
}
I have been trying bind, show, theres no way to make it work properly.
Any help would be welcomed.
Beta Was this translation helpful? Give feedback.
All reactions