$this->jquery->animate(target, parameters, optional speed, optional extra information);
“target” 是任何有效的一个或多个jQuery选择器。
“parameters” 通常是你想改变的元素本身的一系列CSS属性。
“speed” 是可选的,可以被设置为 slow,normal,fast 当中的一种或者是一个毫秒数值。
“extra information” 是可选的,可以包含一个回调函数,或者其它附加信息。
想要一个完整的摘要,请参考 http://docs.jquery.com/Effects/animate
下面是一个例子, id 为"note"的div调用animate(),通过单击引发 jQuery 库的 click() 事件。$params = array(
'height' => 80,
'width' => '50%',
'marginLeft' => 125
);
$this->jquery->click('#trigger', $this->jquery->animate('#note', $params, normal));