jQuery UI API - fold effects (Fold Effect)
category
usage
Description: Folding effects (Fold Effect) by folding elements to hide or show an element.
fold
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
size | Number 或 String | 被折叠元素的尺寸。 | 15 |
horizFirst | Boolean | 当折叠时是否先进行水平方向的折叠。请记得,显示的时候与隐藏的时候顺序相反。 | false |
Examples
Fold-effects (Fold Effect) switching a div.
<! Doctype html> <Html lang = "en"> <Head> <Meta charset = "utf-8"> <Title> folding effects (Fold Effect) Demo </ title> <Link rel = "stylesheet" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <Style> #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> </ Head> <Body> <P> Click anywhere to switch. </ P> <Div id = "toggle"> </ div> <Script> $ (Document) .click (function () { $ ( "#toggle") .toggle ( "Fold"); }); </ Script> </ Body> </ Html>