论坛首页 Web前端技术论坛

JQuery Plug-in Interface Animate

浏览 4272 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-07-20  
About Interface
Interface is a collection of rich interface components which utilizes the lightweight JavaScript library jQuery. With this components you can build rich client web applications and interfaces with the same simplicity as writing JavaScript with jQuery.
关于Interface
Interface 以轻量级JavaScript工具为基础开发而来的富界面组件集合。利用他,你可以像使用Jquery创建JavaScript一样创建富界面客户端Web程序和界面。
Document 文档部分
Animate
Interface overwrites the default 'animate' function with an extended one. The new 'animate' function brings several enhancements:
Interface覆盖了原有的animate方法,并加强了他的功能;
·        Animates a collection of properties using one timer instead of using separate timers per property
·        Handles color properties like 'backgroundColor', 'borderColor' etc.
·        Animates styles and CSS classes
使用一个计时器控制一个动画的集合,而不是分别为每一个成员属性都分配一个计时器;
像处理“backgroundcolor”,“borderColor”属性一样处理颜色属性。
使样式和CSS类拥有动画效果;
Code sample:
$('#test').animate(
        {
               left: 100,
               style: 'padding: 20px 30px; margin: 10px;',
               className: 'greenBorders',
               opacity: 0.4,
               backgroundColor: 'olive'
        },
        'slow'
);
Also, Interface offfers new functions to handle animations:
当然,Interface也提供了许多新的方法处理动画;
stop
Stop an animation at any time.
使动画暂定;
Options:
gotolaststep
Boolean
optional
Whatever to go to the last step in animation
Code sample:
$('#test').stop();
stopAll
Stop current animation and clear all queued animations.
停止当前的所有动画,并清空所有等待队列中的动画;
Options:
gotolaststep
Boolean
optional
Whatever to go to the last step in current animation
Code sample:
$('#test').stopAll();
pause
Add a pause between animations. The selection is not animated till the pausing time expires.
动画播放的过程中停止动画。选中区知道暂停时间结束之前不会停止动画的播放;
Options:
speed
String|Number
optional
A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to pause (e.g. 1000).
callback
Function
optional
A function to be executed whenever the pausing completes.
Code sample:
$('#test').pause(2000);
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics