method:init ( element, attributes, duration, method );
return type:void
content:ใช้กำหนดค่าเริ่มต้นต่างๆให้กับ object anim ( เป็น constructor ของ Yahoo.util.Anim )
example:var attributes = { width: { to: 0 } };
var anim = new YAHOO.util.Anim ( "bamboo", attributes );
anim.init ( "bamboo", { width: { from: 0, to: 300 }, height: { from: 0, to: 300 } } );
comment:ตัวแปร element คือ id ของ element ที่ต้องการให้เกิดการกระทำนี้
ตัวแปร attributes คือ คำสั่งของ css ที่กำหนด attribute ได้แก่ to, by, from, units
ตัวแปร duration คือ กำหนดระยะเวลาที่เกิดการกระทำนี้ ( default = 1 )
ตัวแปร method คือ ฟังก์ชันที่จะทำงานในขณะเกิดการกระทำนี้ ( default = Yahoo.util.Easing.easeNone )