Slideup\使用 jquery 动画下一页

发布于 2024-07-27 05:21:20 字数 276 浏览 11 评论 0原文

我使用以下内容在当前页面中加载新页面,无需刷新。

$(document).ready(function(){
$("#leftnav").click(function(){
    $.post("regions.php",function(data){document.write(data)},"html")
    return false;
});

});

是否可以使用 jquery 对新页面进行动画处理,例如向上滑动新页面?

谢谢,

I use the following to load a new page within the current page, no refresh.

$(document).ready(function(){
$("#leftnav").click(function(){
    $.post("regions.php",function(data){document.write(data)},"html")
    return false;
});

});

Is it possible to animate the new page with jquery, like slide up the new page?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怀念你的温柔 2024-08-03 05:21:20

下面将把新内容添加到隐藏的 div 中,附加到正文中,然后向下滑动。

$(document).ready(function(){
    $("#leftnav").click(function(){
        $.post("regions.php",function(data){
            //create a div and hide it
            //append new content then slideDown  
            $('<div />').hide()
                        .html(data)
                        .appendTo('body')
                        .slideDown()
        return false;
    });
});

The following will add the new content to a hidden div, append to the body and then slideDown.

$(document).ready(function(){
    $("#leftnav").click(function(){
        $.post("regions.php",function(data){
            //create a div and hide it
            //append new content then slideDown  
            $('<div />').hide()
                        .html(data)
                        .appendTo('body')
                        .slideDown()
        return false;
    });
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文