API jQuery UI - efek ledakan (Explode Effect)
kategori
pemakaian
Keterangan: Efek Ledakan (Explode Effect) oleh unsur-unsur sempalan untuk menyembunyikan atau menampilkan elemen.
explode
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
pieces | Integer | 爆炸裂开的碎片数目,应该是个平方数,任何其他值被舍入到最近的平方数。 | 9 |
contoh
Efek penggunaan ledakan (Explode Effect) beralih div.
<! DOCTYPE html> <Html lang = "en"> <Head> <Meta charset = "utf-8"> <Title> efek ledakan (Explode Effect) Demo </ title> <Link rel = "stylesheet" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <Gaya> #toggle { width: 100px; height: 100px; background: # ccc; } </ Style> <Script src = "// code.jquery.com/jquery-1.10.2.js"> </ script> <Script src = "// code.jquery.com/ui/1.10.4/jquery-ui.js"> </ script> </ Kepala> <Body> <P> Klik di mana saja untuk beralih. </ P> <Div id = "beralih"> </ div> <Script> $ (Dokumen) .Klik (function () { $ ( "#toggle") .toggle ( "Explode"); }); </ Script> </ Body> </ Html>