【发布时间】:2018-04-24 08:51:03
【问题描述】:
克隆的视差 jquery 在附加到 dom 后停止工作。 检查我的例子:https://codepen.io/anon/pen/rYOrEO
HTML:
<div class="container">
<a href="#" class="clone">Clone</a>
</div>
<section class="content">
<div class="jumbotron text-center bg-faded my-5" style="background: url('http://lorempixel.com/1200/600/abstract/1') no-repeat center;" data-paroller-factor="0.5">
<h1 class="heading-1 py-5 text-white">Hello Parallax!</h1>
</div>
</section>
JS:
$(window).paroller();
$(function(){
$('.clone').on('click', function() {
alert('hi');
$(".jumbotron").clone().appendTo(".content");
});
});
【问题讨论】:
标签: javascript jquery html clone