使用工具包的Ajax具有幻灯片效果,可以立即使用 [英] Ajax with slide effects onready witout using a toolkit

查看:80
本文介绍了使用工具包的Ajax具有幻灯片效果,可以立即使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的不太擅长Java语言,因此我需要其他帮助。我希望能够使用PHP快速完成AJAX的工作,然后在ajax响应完成时在div中显示响应并将其很好地滑动。

I'm really not that good at Javascript and that, so I need another bit of help. I want to be able to do a quick bit of AJAX using PHP then when the ajax response is finished show the response in a div and SLIDE it down nicely.

基本AJAX方面没有问题。但我希望能够在不使用jQuery或MooTools之类的框架的情况下使其流畅地滑动。主要用于学习,但还有其他原因。因此,以非常简单的方式进行的任何帮助都将很方便。我在网上找不到很多东西。如果我必须使用jQuery,那么我想我可以玩,但是最好的时候我不是Java语言的爱好者...

The basic AJAX side of it is no problem. But I want to be able to have it slide nicely without using any framework like jQuery or MooTools. Mainly for learning, but there are other reasons. So, any help on a very simple way od doing so would be handy. I can't really find much online. If I have to use jQuery then I guess I can, I have played about with it but I'm not a fan of Javascript at the best of times...

所以,是的,几乎所有的建议/技巧/想法/帮助都将非常方便!

So yeah, pretty much any advice/tips/thoughts/help would be really handy!

推荐答案

我想基础知识会有所帮助将timeOut()与增加高度直到达到全高结合起来:

I guess the basics would be something of a timeOut() in combination with increasing the height until it is full height:


  1. 将元素的显示设置为无

  2. 获取元素的完整高度,例如:
    document.getelementById('IDofElement')。style.height

  3. 将高度设置为0,将显示设置为块

  4. 设置 timeOut() ,并增加被调用函数的高度,如果元素尚未达到完整高度,则激活一个新的timeOut()。

  1. set the display of the element to none
  2. get the full height of the element, something like:
    document.getelementById('IDofElement').style.height
  3. set the height to 0 and the display to something like block
  4. set a timeOut() and increase the height in the called function, activate a new timeOut() if the element is not already full height.

不使用库的唯一真正缺点是您将不得不在许多不同的浏览器中进行测试,并可能根据使用的浏览器进行修改。图书馆已经为您解决了这个问题。

The only real disadvantage of not using a library would be that you would have to test in a lot of different browsers and perhaps make modifications according to the browser used. Libraries have already solved that problem for you.

这篇关于使用工具包的Ajax具有幻灯片效果,可以立即使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆