我正在使用下面的代码在我的网页上显示一些动画效果的数据
.done(function (response) {
$(".loadig-overlay").hide();
$('#Container').toggle('slide', {
direction: 'left'
}, 250, function () {
$("#Container").html(response);
$('#Container').toggle('slide', {
direction: 'right'
}, 250);
});
})#container html将替换为响应中接收到的内容,但不会应用动画效果
发布于 2020-07-25 05:16:50
$('#Container').toggle('slide', {
direction: 'left'
}, 500, function () {
$("#Container").html('abc');
$('#Container').toggle('slide', {
direction: 'right'
}, 500);
}); <script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30="
crossorigin="anonymous"></script>
<div id="Container">
</div>
看起来你的脚本一切正常。我唯一想到的是包含“Container”的元素太小了,所以你看不到效果。或者您可能一直在使用相邻元素的z-index?
https://stackoverflow.com/questions/63081073
复制相似问题