code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231 values | license stringclasses 13 values | size int64 1 2.01M |
|---|---|---|---|---|---|
<html>
<head>
<title>Pop-up Link with Description</title>
<style type="text/css">
.transparent {
filter:alpha(opacity=90);
background-color:green;
display:none;
width:170;
height:100;
position:absolute;
color: white;
border: 1 green solid;
}
</style>
<script>
// this function shows the pop-up when user moves the mouse over the link
function Show()
{
x = event.clientX + document.body.scrollLeft; // get the mouse left position
y = event.clientY + document.body.scrollTop + 35; // get the mouse top position
Popup.style.display="block"; // display the pop-up
Popup.style.left = x; // set the pop-up's left
Popup.style.top = y; // set the pop-up's top
}
// this function hides the pop-up when user moves the mouse out of the link
function Hide()
{
Popup.style.display="none"; // hide the pop-up
}
</script>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<a href="" onMouseOut="Hide()" onMouseOver="Show()" onMouseMove="Show()">Move the mouse over here</a><br>
<br>
Move your move over the link above<br>
and the pop-up appears. And the pop-up<br>
follows your mouse as long as your mouse<br>
is still over the link.
<div id="Popup" class="transparent">
<div style="background-color: #003366"><b>Title goes here</b></div>
<div></b>Description goes here</div>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/my-js/TransparentPopUpSource.html | HTML | art | 1,372 |
/*
*@Generator -> LiHuiGang - Email:lhg133@126.com - QQ:463214570
*@Copyright (c) 2009 LiHuiGang Compostion
*/
html, body
{
background-color: transparent;
margin: 0;
padding: 0;
font: 11px Verdana, Arial, sans-serif;
}
body
{
overflow: hidden;
width: 100%;
height: 100%;
background-color: transparent;
}
.contain
{
position: absolute;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
overflow: hidden;
}
.dlgtit
{
height: 30px;
_padding-right: 5px;
_padding-left: 5px;
}
.dlgfoot
{
position: absolute;
height: 32px;
left: 0;
right: 0;
bottom: 0;
_padding-right: 5px;
_padding-left: 5px;
}
#tl, #tc, #tr, #bl, #bc, #br
{
position: absolute;
top: 0;
background-image: url(images/d_bg.gif);
}
#tl, #tc, #tr{ cursor: move; height: 30px; }
#bl, #bc, #br{ height: 32px; }
#tl, #tr, #bl, #br
{
width: 5px;
background-repeat: no-repeat;
}
#tl
{
left: 0;
background-position: 0 0;
}
#tr
{
right: 0;
background-position: 0 -60px;
}
#bl
{
left: 0;
background-position: 0 -90px;
}
#br
{
right: 0;
background-position: 0 -154px;
}
#tc, #bc
{
width: auto;
_width: 100%;
left: 5px;
right: 5px;
background-repeat: repeat-x;
}
#tc{ background-position: 0 -30px; }
#bc{ _position: static; background-position: 0 -122px; }
#tc span
{
position: relative;
top: 7px !important;
top: 9px;
left: 10px;
color: #fff;
font-size: 13px;
font-weight: bold;
}
.dlginner
{
background-color: #eff5fc;
border-left: 1px solid #005195;
border-right: 1px solid #005195;
}
#xbtn
{
position: absolute;
top: 0px;
right: 15px;
width: 43px;
height: 19px;
background-image: url(images/cbtn.gif);
background-repeat: no-repeat;
background-position: 0 0;
}
#obtn, #cbtn
{
position: absolute;
top: 6px;
width: 60px;
height: 21px;
cursor: default;
text-align: center;
background-image: url(images/obtn.gif);
background-repeat: no-repeat;
background-position: 0 0;
}
#cbtn{ right: 20px; }
#obtn{ right: 85px; }
#obtn span, #cbtn span
{
position: relative;
top: 3px !important;
top: 5px;
font: 12px Verdana, Arial, sans-serif;
}
#throbber
{
width: 180px;
height: 25px;
top: 50%;
left: 50%;
margin-left: -90px;
margin-top: -12px;
z-index: 2;
text-align: right;
font: 12px Verdana, Arial, sans-serif;
background-image: url(images/wait.gif);
background-repeat: no-repeat;
} | zzh-simple-hr | ZJs/webapp/my-js/lightdialog/lhgdialog.css | CSS | art | 2,565 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>lhgdialog - samples</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{margin:0;padding:0;font:14px Verdana, Arial, sans-serif;line-height:200%;}
#content{padding-left:50px;padding-right:50px;}
#content h2{font-size:18px;color:#1E9300;padding-top:8px;margin-bottom:8px;}
#content h3{margin-top:8px;margin-bottom:8px;FONT:bold 14px 宋体,tahoma,arial,sans-serif;COLOR:#0033CC;}
#content div{margin-top:10px;margin-bottom:10px;border:#666 solid 1px;padding:10px;}
#content input{margin-bottom:5px;height:22px;font:12px Tahoma;border:1px solid #808080;}
#content span{color:#f00;font-weight:bold;}
ul, ol{color:#000000;}
</style>
<script type="text/javascript" src="lhgdialog.js"></script>
<script type="text/javascript">
function open1()
{
lhgdialog.opendlg( '弹出普通带遮罩层的窗口', '', 400, 300 );
}
function open2()
{
lhgdialog.opendlg( '弹出普通带遮罩层的窗口', '_content.html', 400, 300, true );
}
function open3()
{
lhgdialog.opendlg( '指定弹出窗口的位置', '', 400, 300, '', 1000, 100 );
}
function open4()
{
lhgdialog.opendlg( '在窗口中加载外部页面', 'http://www.google.com', 640, 480 );
}
</script>
</head>
<body>
<div id="content">
<h2>一、组件简介</h2>
<span>lhgdialog DIV弹出窗口框架是一个简洁、高效、美观、易用的多功能弹出窗口组件。</span><br /><b>它的主要特点有:</b><br />
<ol>
<li>代码简洁:整个组件所有代码总共<span>18K</span>,如果不算上图片和CSS样式表文件,总共大小才<span>12K</span>不到。(这是在代码未压缩情况下)</li>
<li>程序运行效率高:弹出窗口在打开和拖动时非常流畅,在同等测试条件下,CUP的占有率在<span>30%左右,最高不超过40%</span>。而其它弹出
窗口(比如:JQuery,ExtJs,Mootools,还有其它弹出窗口等)CUP的占有率都在<span>50%左右,最高60%以上</span>。</li>
<li>窗口样式更改简便:组件采用的是QQ2009窗口的界面,虽说不上很漂亮,但也不算难看(本个界面设计能力较差:-)...)如果你
想更改窗口样式也很容易,<span>组件采用的是静态模板来设计的窗口的样式</span>,你只要更改lhgdialog.html里body
之间的HTML代码,再相应改下lhgdialog.css样式表文件即可。而且组件样式不受调用页面限制,可随意更改
你想要的样式。</li>
<li>可扩展性强,复用性高:组件提供了基本常用的功能,在此基础上可根据个人需要增加相应功能,只需要增加少量代码即可开发
出各种弹出窗口。<span>而且窗口的内容页和框架也是相互独立的</span>,设计好框架后你只要更改内容页即可。</li>
<li>组件调用灵活:在同一页面可以调用任意多个弹出窗口,<span>而且最突出的是在同一页面可以弹出不带遮罩和带遮罩的窗口混用。</span></li>
<li>支持所有主流浏览器:<span>IE6+,Firefox2.0+,Chrome(谷歌浏览器),Opera9.5+,Safari3.0+等。</span>(题外音:个人觉得Opera最好用,打开
网页的速度是我上面列出所有浏览器中最快的,不是指打开我的组件,而是打开任何网页个人感觉速度很
快,而且人性化设计也是比较突出的。不是做广告噢:-)...)</li>
</ol>
本人编写组件一直争取能在满足使用的情况下做到代码最简洁,执行效率高,所以有些不太实用的功能就没有加上,如朋友们需要
可自行加上,或与我共同探讨也可。我的QQ:463214570 ,blog:http://www.cnblogs.com/lhgstudio
<h2>二、组件结构</h2>
<ol>
<li><span>lhgdialog.js</span>:组件主调用文件,在调用的地方只需要该文件。</li>
<li><span>lhgdialog.html</span>:组件窗口静态模板文件,控制窗口样式及对窗口的操作。</li>
<li><span>lhgdialog.css</span>:组件窗口样式表文件。</li>
<li><span>_content.html</span>:组件窗口内容页示例文件,此页面由用户自己随意定制。</li>
<li><span>_samples.html</span>:调用组件示例页,即此页面。</li>
<li><span>images</span>:窗口所有图片文件夹</li>
</ol>
<h2>三、调用方法及参数说明</h2>
<ol>
<li>在需要调用的页面引入lhgdialog.js,例如:<span><script type="text/javascript" src="lhgdialog.js"></script></span></li>
<li>然后在要调用的位置上引发的事件中加入调用代码,例如:<input type="button" onclick="lhgdialog.opendlg(...);"/> 或者在onclick=这写个自己的函数,如:open();然后再在JS的部位里加个function open()函数,再在里面调用lhgdialog.opendlg</li>
<li>参数说明:lhgdialog.opendlg是主调函数,他共有7个参数,详细如下:<br/>
lhgdialog.opendlg( <span>窗口标题,内容页,窗口宽,窗口高,是否显示遮罩层,弹出窗口距顶部距离,弹出窗口距左边距离</span> )<br/>
例如:lhgdialog.opendlg( '登录窗口', 'login.html', 400, 300 ); 后面的参数如果不用可以省略<br/>
lhgdialog.opendlg( '', 'ok.html', 600, 480, true, 100, 200 ); 如果前面有不填的参数就用''就可以了,但不可省略。</li>
</ol>
<h2>四、功能及示例</h2>
<h3>1. 弹出普通不带遮罩层的窗口(可弹出任意个)</h3>
<div>
<input type="button" id="btn1" value="弹出普通不带遮罩层的窗口" onclick="open1();" /><br />
<span>调用代码:</span>lhgdialog.opendlg( '弹出普通带遮罩层的窗口', '', 400, 300 );
</div>
<h3>2. 弹出普通带遮罩层的窗口</h3>
<div>
<input type="button" id="btn1" value="弹出普通带遮罩层的窗口" onclick="open2();" /><br />
<span>调用代码:</span>lhgdialog.opendlg( '弹出普通不带遮罩层的窗口', '', 400, 300, true );
</div>
<h3>3. 指定弹出窗口的位置(距离top:1000px,left:100px)</h3>
<div>
<input type="button" id="btn1" value="指定弹出窗口的位置" onclick="open3();" /><br />
<span>调用代码:</span>lhgdialog.opendlg( '指定弹出窗口的位置', '', 400, 300, '', 1000, 100 );<br/>
<span>注:top和left都可单独指定</span>
</div>
<h3>4. 在窗口中加载外部页面</h3>
<div>
<input type="button" id="btn1" value="在窗口中加载外部页面" onclick="open4();" /><br />
<span>调用代码:</span>lhgdialog.opendlg( '在窗口中加载外部页面', 'http://www.google.com', 640, 480 );
</div>
</div>
</body>
</html> | zzh-simple-hr | ZJs/webapp/my-js/lightdialog/_samples.html | HTML | art | 7,194 |
/*
*@Generator -> LiHuiGang - Email:lhg133@126.com - QQ:463214570
*@Copyright (c) 2009 LiHuiGang Compostion
*/
var ua = navigator.userAgent.toLowerCase(), bzi;
var binfo =
{
ie : /*@cc_on!@*/false,
i7 : /*@cc_on!@*/false && (parseInt(ua.match(/msie (\d+)/)[1],10) >= 7)
};
var tool =
{
restyle : function(e)
{
e.style.cssText = 'margin:0;padding:0;background-image:none;background-color:transparent;border:0;';
},
ststyle : function( e, dict )
{
var style = e.style;
for( var n in dict ) style[n] = dict[n];
},
stopac : function( e, opac )
{
if( binfo.ie )
{
opac = Math.round( opac * 100 );
e.style.filter = ( opac > 100 ? '' : 'alpha(opacity=' + opac + ')' );
}
else
e.style.opacity = opac;
},
getvoid : function()
{
if( binfo.ie )
return ( binfo.i7 ? '' : 'javascript:\'\'' );
return 'javascript:void(0)';
},
addevt : function( o, e, l )
{
if( binfo.ie )
o.attachEvent( 'on' + e, l );
else
o.addEventListener( e, l, false );
},
remevt : function( o, e, l )
{
if( binfo.ie )
o.detachEvent( 'on' + e, l );
else
o.removeEventListener( e, l, false );
},
isdtd : function(doc)
{
return ( 'CSS1Compat' == ( doc.compatMode || 'CSS1Compat' ) );
},
getclsize : function(w)
{
if( binfo.ie )
{
var oSize, doc = w.document.documentElement;
oSize = ( doc && doc.clientWidth ) ? doc : w.document.body;
if(oSize)
return { w : oSize.clientWidth, h : oSize.clientHeight };
else
return { w : 0, h : 0 };
}
else
return { w : w.innerWidth, h : w.innerHeight };
},
getspos : function(w)
{
if( binfo.ie )
{
var doc = w.document;
var oPos = { X : doc.documentElement.scrollLeft, Y : doc.documentElement.scrollTop };
if( oPos.X > 0 || oPos.Y > 0 ) return oPos;
return { X : doc.body.scrollLeft, Y : doc.body.scrollTop };
}
else
return { X : w.pageXOffset, Y : w.pageYOffset };
},
getlink : function(c)
{
if( c.length == 0 ) return;
return '<' + 'link href="' + c + '" type="text/css" rel="stylesheet"/>';
},
regdoll : function(w)
{
if( binfo.ie )
w.$ = w.document.getElementById;
else
w.$ = function(id){ return w.document.getElementById(id); };
},
getedoc : function(e)
{
return e.ownerDocument || e.document;
},
getestyle : function( e, p )
{
if( binfo.ie )
return e.currentStyle[p];
else
return e.ownerDocument.defaultView.getComputedStyle(e, '').getPropertyValue(p);
},
disctmenu : function(doc)
{
doc.oncontextmenu = function(e)
{
e = e || event || this.parentWindow.event;
var o = e.srcElement || e.target;
if( !( o.type == 'password' || o.type == 'text' || o.type == 'textarea' ) )
{
if( binfo.ie ) e.returnValue = false; else e.preventDefault();
}
};
},
remnode : function(n){ if(n) return n.parentNode.removeChild(n); }
};
var lhgdialog = (function()
{
var twin = window.parent, bshow, cover;
while( twin.parent && twin.parent != twin )
{
try
{
if( twin.parent.document.domain != document.domain ) break;
if( twin.parent.document.getElementsByTagName('frameset').length > 0 ) break;
}
catch(e){break;}
twin = twin.parent;
}
var tdoc = twin.document;
var getzi = function()
{
if(!bzi) bzi = 999; return ++bzi;
};
var resizehdl = function()
{
if(!cover) return;
var rel = tool.isdtd(tdoc) ? tdoc.documentElement : tdoc.body;
tool.ststyle(cover,
{
'width' : Math.max( rel.scrollWidth, rel.clientWidth, tdoc.scrollWidth || 0 ) - 1 + 'px',
'height' : Math.max( rel.scrollHeight, rel.clientHeight, tdoc.scrollHeight || 0 ) - 1 + 'px'
});
};
return {
opendlg : function( t, p, w, h, b, o, l )
{
if(b) this.dcover();
var dinfo = { tit : t, page : p, win : window, twon : twin };
var clsize = tool.getclsize(twin), spos = tool.getspos(twin);
var it = o ? o : Math.max( spos.Y + ( clsize.h - h - 20 ) / 2, 0 );
var il = l ? l : Math.max( spos.X + ( clsize.w - w - 20 ) / 2, 0 );
var dfrm = tdoc.createElement('iframe');
tool.restyle(dfrm); dfrm.src = 'lhgdialog.html';
dfrm.frameBorder = 0; dfrm.allowTransparency = true;
tool.ststyle(dfrm,
{
'position' : 'absolute', 'top' : it + 'px', 'left' : il + 'px',
'width' : w + 'px', 'height' : h + 'px', 'zIndex' : getzi()
});
tdoc.body.appendChild(dfrm); dfrm._dlgargs = dinfo; bshow = b;
},
closdlg : function(d){ var dlg = d.frameElement; tool.remnode(dlg); if(bshow) this.hcover(); },
dcover : function()
{
cover = tdoc.createElement('div'); tool.restyle(cover);
tool.ststyle(cover,
{
'position' : 'absolute', 'zIndex' : getzi(), 'top' : '0px',
'left' : '0px', 'backgroundColor' : '#fff'
});
tool.stopac( cover, 0.50 );
if( binfo.ie && !binfo.i7 )
{
var ifrm = tdoc.createElement('iframe');
tool.restyle(ifrm); ifrm.hideFocus = true;
ifrm.frameBorder = 0; ifrm.src = tool.getvoid();
tool.ststyle(ifrm,
{
'width' : '100%', 'height' : '100%', 'position' : 'absolute', 'left' : '0px',
'top' : '0px', 'filter' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
});
cover.appendChild(ifrm);
}
tool.addevt( twin, 'resize', resizehdl ); resizehdl(); tdoc.body.appendChild(cover);
},
hcover : function(){ tool.remnode(cover); cover = null }
};
})(); | zzh-simple-hr | ZJs/webapp/my-js/lightdialog/lhgdialog.js | JavaScript | art | 5,682 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
*@Generator -> LiHuiGang - Email:lhg133@126.com - QQ:463214570
*@Copyright (c) 2009 LiHuiGang Compostion
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var W = frameElement._dlgargs.win;
function A(){ return frameElement._dlgargs; }
window.focus(); W.tool.regdoll(window);
document.write( W.tool.getlink('lhgdialog.css') );
var recontze = function()
{
var h = $('contain').offsetHeight; h -= $('dtit').offsetHeight;
h -= $('dfoot').offsetHeight; $('dinner').style.height = Math.max( h, 0 ) + 'px';
}
var drag = function()
{
var regwin = [], lacoor, curpos;
var cluphdl = function()
{
for( var i = 0; i < regwin.length; i++ )
{
W.tool.remevt( regwin[i].document, 'mousemove', dragmovehdl );
W.tool.remevt( regwin[i].document, 'mouseup', draguphdl );
}
};
var dragmovehdl = function(evt)
{
if(!lacoor) return;
if(!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
curpos =
{
x : curpos.x + ( curcoor.x - lacoor.x ),
y : curpos.y + ( curcoor.y - lacoor.y )
};
lacoor = curcoor;
frameElement.style.left = curpos.x + 'px';
frameElement.style.top = curpos.y + 'px';
if(evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
};
var draguphdl = function(evt)
{
if(!lacoor) return;
if(!evt) evt = W.tool.getedoc(this).parentWindow.event;
cluphdl(); lacoor = null;
};
return {
downhdl : function(evt)
{
var view = null;
if(!evt){ view = W.tool.getedoc(this).parentWindow; evt = view.event; } else view = evt.view;
var tget = evt.srcElement || evt.target;
if( tget.id == 'xbtn' ) return;
lacoor = { x : evt.screenX, y : evt.screenY };
curpos =
{
x : parseInt( W.tool.getestyle( frameElement, 'left' ), 10 ),
y : parseInt( W.tool.getestyle( frameElement, 'top' ), 10 )
};
for( var i = 0; i < regwin.length; i++ )
{
W.tool.addevt( regwin[i].document, 'mousemove', dragmovehdl );
W.tool.addevt( regwin[i].document, 'mouseup', draguphdl );
}
if(evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl : function(w){ regwin.push(w); }
};
}();
(function()
{
window.setokbtn = function(s)
{
$('obtn').style.visibility = ( s ? '' : 'hidden' );
};
window.init = function()
{
recontze(); $('throbber').style.visibility = ''; loadbtnevt(); loadinnfrm();
if(W.binfo.ie) window.document.onmousedown = setop; else window.onmousedown = setop;
var tite = $('dtit'); tite.onmousedown = drag.downhdl; drag.reghdl(window); drag.reghdl(A().twon);
W.tool.disctmenu(document); if( /http/.test(A().page) ) $('throbber').style.visibility = 'hidden';
};
var setop = function(evt)
{
if(!evt) evt = event || this.parentWindow.event;
W.tool.ststyle( frameElement, {'zIndex':parseInt(W.bzi,10) + 1} );
W.bzi = frameElement.style.zIndex; evt.cancelBubble = true;
};
var loadinnfrm = function()
{
var s = /http/.test(A().page) ? '' : ' style="visibility:hidden;" ';
$('dinner').innerHTML = '<iframe id="frmain" src="' + A().page + '" name="frmain" frameborder="0" ' +
'width="100%" height="100%" scrolling="auto"' + s + 'allowtransparency="true"><\/iframe>';
};
window.loadinndlg = function()
{
if( !frameElement.parentNode ) return null;
var frmain = $('frmain'), innwin = frmain.contentWindow, inndoc = innwin.document;
$('throbber').style.visibility = 'hidden'; frmain.style.visibility = '';
if(W.binfo.ie) inndoc.onmousedown = setop; else innwin.onmousedown = setop;
W.tool.disctmenu(inndoc); drag.reghdl(innwin); innwin.focus(); return W;
};
window.ok = function()
{
var frm = window.frames['frmain'];
if( frm.ok && frm.ok() ) closedlg(); else frm.focus();
};
window.cancel = function(){ return closedlg(); };
window.closedlg = function()
{
if( $('frmain') ) $('frmain').src = W.tool.getvoid();
$('throbber').style.visibility = 'hidden'; W.lhgdialog.closdlg(window);
};
var loadbtnevt = function()
{
$('xbtn').onmouseover = function(){ this.style.backgroundPosition = '0 -19px'; };
$('cbtn').onmouseout = $('obtn').onmouseout = $('xbtn').onmouseout = function(){ this.style.backgroundPosition = '0 0'; };
$('obtn').onmouseover = $('cbtn').onmouseover = function(){ this.style.backgroundPosition = '0 -21px'; };
$('tc').innerHTML = '<span>' + A().tit + '</span>';
};
})();
</script>
</head>
<body onload="init();">
<div id="contain" class="contain">
<div id="dtit" class="dlgtit">
<div id="tl"></div><div id="tc"></div><div id="tr"></div>
<div id="xbtn" onclick="cancel();"></div>
</div>
<div id="dinner" class="dlginner"></div>
<div id="dfoot" class="dlgfoot">
<div id="bl"></div><div id="bc"></div><div id="br"></div>
<div id="cbtn" onclick="cancel();"><span>取 消</span></div>
<div id="obtn" style="visibility:hidden;" onclick="ok();"><span>确 定</span></div>
</div>
</div>
<div id="throbber" style="position:absolute;visibility:hidden;">正在加载窗口内容,请稍等....</div>
</body>
</html> | zzh-simple-hr | ZJs/webapp/my-js/lightdialog/lhgdialog.html | HTML | art | 5,534 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>dialog - samples</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#div1{position:absolute;width:240px;height:18px;top:50%;left:50%;margin-left:-120px;margin-top:-9px;color:red;}
</style>
<script type="text/javascript">
var D = window.parent.loadinndlg();
var W = window.parent;
window.onload = function()
{
W.setokbtn(true);
}
function ok()
{
alert( '您单击了确定按钮' );
return true;
}
</script>
</head>
<body>
<div id="div1">LHGdialog多功能DIV弹出窗口框架</div>
</body>
</html> | zzh-simple-hr | ZJs/webapp/my-js/lightdialog/_content.html | HTML | art | 785 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>简单alert框</title>
<script language="javascript">
var z = z||{};
z.getEvent = function(){
return window.event || arguments.callee.caller.arguments[0];
}
z.alert = function(title, msg, w, h){
var s=document.getElementsByTagName("select"); //--------------把所有select标签捉住,(为兼容ie6下select)
for(var j=0;j<s.length;j++){s[j].style.display="none";} //--------------设为不显示,再进行下面操作
var titleheight = "22px", // 提示窗口标题高度
bordercolor = "#666699", // 提示窗口的边框颜色
titlecolor = "#FFFFFF", // 提示窗口的标题颜色
titlebgcolor = "#666699", // 提示窗口的标题背景色
bgcolor = "#FFFFFF"; // 提示内容的背景色
var iWidth = document.documentElement.clientWidth,
iHeight = document.documentElement.clientHeight,
cHeight = document.body.clientHeight;
//创建背景遮盖层
var bgObj = document.createElement("div");
bgObj.style.cssText = "position:absolute;left:0px;top:0px;width:"+iWidth+"px;height:"+Math.max(cHeight, iHeight)+"px;filter:Alpha(Opacity=30);opacity:0.3;background-color:#000000;z-index:101;";
document.body.appendChild(bgObj);
//创建可拖动的弹出框
var msgObj=document.createElement("div");
msgObj.style.cssText = "position:absolute;font:11px '宋体';top:"+(iHeight-h)/2+"px;left:"+(iWidth-w)/2+"px;width:"+w+"px;height:"+h+"px;text-align:center;border:1px solid "+bordercolor+";background-color:"+bgcolor+";padding:1px;line-height:22px;z-index:102;";
document.body.appendChild(msgObj);
//创建拖动,消息及关闭区域
var table = document.createElement("table");
msgObj.appendChild(table);
table.style.cssText = "margin:0px;border:0px;padding:0px;";
table.cellSpacing = 0;
var tr = table.insertRow(-1);
var titleBar = tr.insertCell(-1);
titleBar.style.cssText = "width:100%;height:"+titleheight+"px;text-align:left;padding:3px;margin:0px;font:bold 13px '宋体';color:"+titlecolor+";border:1px solid " + bordercolor + ";cursor:move;background-color:" + titlebgcolor;
titleBar.style.paddingLeft = "10px";
titleBar.innerHTML = title;
var closeBtn = tr.insertCell(-1);
closeBtn.style.cssText = "cursor:pointer; padding:2px;background-color:" + titlebgcolor;
closeBtn.innerHTML = "<span style='font-size:15pt; color:"+titlecolor+";'>×</span>";
closeBtn.onclick = function(){
for(var j=0;j<s.length;j++){s[j].style.display="";} //--------------再给select显出来
document.body.removeChild(bgObj);
document.body.removeChild(msgObj);
}
var msgBox = table.insertRow(-1).insertCell(-1);
msgBox.style.cssText = "font:10pt '宋体';";
msgBox.colSpan = 2;
msgBox.innerHTML = msg;
//拖动区域注册事件
var moveX = 0,
moveY = 0,
moveTop = 0,
moveLeft = 0,
moveable = false,
docMouseMoveEvent = document.onmousemove,
docMouseUpEvent = document.onmouseup;
titleBar.onmousedown = function() {
var evt = z.getEvent();
moveable = true;
moveX = evt.clientX;
moveY = evt.clientY;
moveTop = parseInt(msgObj.style.top);
moveLeft = parseInt(msgObj.style.left);
document.onmousemove = function() {
if (moveable) {
var evt = z.getEvent();
var x = moveLeft + evt.clientX - moveX;
var y = moveTop + evt.clientY - moveY;
if ( x > 0 &&( x + w < iWidth) && y > 0 && (y + h < iHeight) ) {
msgObj.style.left = x + "px";
msgObj.style.top = y + "px";
}
}
};
document.onmouseup = function () {
if (moveable) {
document.onmousemove = docMouseMoveEvent;
document.onmouseup = docMouseUpEvent;
moveable = false;
moveX = 0;
moveY = 0;
moveTop = 0;
moveLeft = 0;
}
};
}
}
</script>
</head>
<body>
<input type="button" value="点这里" onclick="z.alert('标题','这里是内容',300,200);" />
<select>
<option>件Event对象,用于兼</opation>
</select>
</body>
</html> | zzh-simple-hr | ZJs/webapp/my-js/alert.html | HTML | art | 4,217 |
/**************************************************
* dom-drag.js
* 09.25.2001
* www.youngpup.net
* Script featured on Dynamic Drive (http://www.dynamicdrive.com) 12.08.2005
**************************************************
* 10.28.2001 - fixed minor bug where events
* sometimes fired off the handle, not the root.
**************************************************/
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown = Drag.start;
o.hmode = bSwapHorzRef ? false : true ;
o.vmode = bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX = typeof minX != 'undefined' ? minX : null;
o.minY = typeof minY != 'undefined' ? minY : null;
o.maxX = typeof maxX != 'undefined' ? maxX : null;
o.maxY = typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
if (o.hmode) {
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper) nx = o.xMapper(y)
else if (o.yMapper) ny = o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
| zzh-simple-hr | ZJs/webapp/my-js/cover-drag/dom-drag.js | JavaScript | art | 4,069 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>8</title>
<meta http-equiv="imagetoolbar" content="no">
<style type="text/css">
html {
overflow: hidden;
}
body {
margin: 0px;
padding: 0px;
background: #222;
position: absolute;
width: 100%;
height: 100%;
}
#screen {
position:absolute;
left: 0%;
top: 0%;
width: 100%;
height: 100%;
background: #000;
overflow: hidden;
cursor: url("../cross_rm.cur"), auto;
}
#pan {
position: absolute;
height: 150%;
width: 150%;
padding: 5%;
background: #000000 url("bumps2.gif");
}
#screen .frame {
position: relative;
float: left;
width: 29%;
height: 27%;
margin: 2%;
background: #000;
overflow: hidden;
}
#screen .slider {
position: absolute;
width: 100%;
height: 100%;
background: #222 url("bumps3.gif");
z-index: 1000;
}
#pan img {
position: absolute;
visibility: hidden;
}
#pan .legend {
position: absolute;
bottom: 0px;
font-size: 1em;
color: #FFF;
width: 2000px;
font-family: arial;
font-weight: bold;
}
</style>
<script type="text/javascript">
var xm = 0;
var ym = 0;
sP = {
cx : 0,
cy : 0,
N : 0,
R : [],
I : [],
C : [],
L : [],
Id : 0,
init : function ()
{
/* ==== init script ==== */
this.scr = document.getElementById('screen');
this.pan = document.getElementById('pan');
this.div = this.pan.getElementsByTagName('div');
this.scr.onselectstart = function () { return false; }
this.scr.ondrag = function () { return false; }
/* ==== for each pane ==== */
for (var i = 0, o; o = this.div[i]; i++)
{
if (o.className == 'frame')
{
/* ==== create legend ==== */
o.l = document.createElement('div');
o.l.className = 'legend';
o.appendChild(o.l);
/* ==== create flap ==== */
o.r = document.createElement('div');
o.r.className = 'slider';
o.appendChild(o.r);
o.r.x = 0;
o.r.l = o.l;
o.r.p = 0;
o.r.s = 2;
o.r.m = false;
o.img = o.r.img = o.getElementsByTagName('img')[0];
o.r.c = Math.random() * 100;
o.r.o = o;
sP.R[sP.N] = o.r;
sP.I[sP.N] = o.img.src;
sP.L[sP.N] = o.title;
o.title = "";
sP.N++;
/* ==== flap mouse over event ==== */
o.r.onmouseover = function ()
{
if (!this.m && this.img.complete)
{
/* ==== switch image ==== */
if (sP.O != this && !this.n)
{
this.x = this.o.offsetWidth;
this.l.innerHTML = sP.L[sP.Id];
this.img.src = sP.I[sP.Id];
this.resize();
this.n = true;
if(++sP.Id >= sP.N)
{
sP.Id = 0;
for (var i = 0, o; o = sP.R[i]; i++) o.n = false;
}
}
/* ==== up++ ==== */
if (sP.O)
{
sP.O.s = 2;
sP.C.push(sP.O);
}
this.m = true;
sP.O = this;
sP.Or = this;
}
}
/* ==== resize image ==== */
o.r.resize = function ()
{
var i = new Image();
i.src = this.img.src;
this.img.style.width = (i.width < this.offsetWidth) ? Math.round(this.offsetWidth * 1.25) + 'px' : Math.round(i.width) + 'px';
this.img.style.height = (i.height < this.offsetHeight) ? Math.round(this.offsetHeight * 1.25) + 'px' : Math.round(i.height) + 'px';
this.w = (this.img.offsetWidth - this.offsetWidth) * .5;
this.h = (this.img.offsetHeight - this.offsetHeight) * .5;
this.img.style.visibility = 'visible';
}
}
}
/* ==== start script ==== */
sP.resize();
sP.run();
},
resize : function () {
/* ==== window resize ==== */
var o = sP.scr;
sP.nw = o.offsetWidth;
sP.nh = o.offsetHeight;
sP.iw = sP.pan.offsetWidth;
sP.ih = sP.pan.offsetHeight;
for (sP.nx = 0, sP.ny = 0; o != null; o = o.offsetParent)
{
sP.nx += o.offsetLeft;
sP.ny += o.offsetTop;
}
for (var i = 0, o; o = sP.R[i]; i++) o.resize();
},
/* ==== main loop ==== */
run : function ()
{
/* ==== scroll main frame ==== */
sP.cx += (((Math.max(-sP.nw, Math.min(0, (sP.nw * .5 - (xm - sP.nx) * 2))) * (sP.iw - sP.nw)) / sP.nw) - sP.cx) * .1;
sP.cy += (((Math.max(-sP.nh, Math.min(0, (sP.nh * .5 - (ym - sP.ny) * 2))) * (sP.ih - sP.nh)) / sP.nh) - sP.cy) * .1;
sP.pan.style.left = Math.round(sP.cx) + 'px';
sP.pan.style.top = Math.round(sP.cy) + 'px';
/* ==== lissajou ==== */
if(sP.O) {
sP.O.c += .015;
sP.O.img.style.left = Math.round(-sP.O.w + sP.O.w * Math.sin(sP.O.c * 1.1)) + 'px';
sP.O.img.style.top = Math.round(- sP.O.h + sP.O.h * Math.sin(sP.O.c)) + 'px';
sP.O.l.style.left = Math.round(sP.O.x--) + 'px';
}
/* ==== up ==== */
if (sP.Or)
{
sP.Or.p -= sP.Or.s;
sP.Or.s *= 1.1;
if (sP.Or.p < -sP.Or.offsetHeight)
{
sP.Or.p = -sP.Or.offsetHeight;
sP.Or.s = 2;
sP.Or.m = false;
sP.Or = false;
}
sP.O.style.top = Math.round(sP.O.p) + 'px';
}
/* ==== down ==== */
for (var i = 0, c; c = sP.C[i]; i++)
{
if (c != sP.Or)
{
c.p += c.s;
c.s *= 1.2;
if (c.p >= 0)
{
c.p = 0;
c.s = 2;
c.m = false;
sP.C.splice(i, 1);
}
c.style.top = Math.round(c.p) + 'px';
} else {
c.s = 2;
c.m = false;
sP.C.splice(i, 1);
}
}
setTimeout(sP.run, 16);
}
}
/* ==== global mouse position ==== */
document.onmousemove = function(e)
{
if (window.event) e = window.event;
xm = e.clientX;
ym = e.clientY;
return false;
}
</script>
</head>
<body>
<div id="screen">
<div id="pan">
<div class="frame" title="Isolating the longer dimension of the main hall"><img src="http://preview.zcool.com.cn/code/js/04/8/gr69.jpg" alt=""></div>
<div class="frame" title="?We'll start from here?, my partner said."><img src="http://preview.zcool.com.cn/code/js/04/8/or66.jpg" alt=""></div>
<div class="frame" title="As we proceeded, I recalled a similar situation"><img src="http://preview.zcool.com.cn/code/js/04/8/bl117.jpg" alt=""></div>
<div class="frame" title="The place was no example of resource efficient construction."><img src="http://preview.zcool.com.cn/code/js/04/8/bl112.jpg" alt=""></div>
<div class="frame" title="Ultracompaction had been caused by the linear vibrator."><img src="http://preview.zcool.com.cn/code/js/04/8/gr68.jpg" alt=""></div>
<div class="frame" title="We put the meter to use. It was the fully-built one."><img src="http://preview.zcool.com.cn/code/js/04/8/rd103.jpg" alt=""></div>
<div class="frame" title="Soon we accessed the restricted area."><img src="http://preview.zcool.com.cn/code/js/04/8/rd101.jpg" alt=""></div>
<div class="frame" title="The combo password was validated."><img src="http://preview.zcool.com.cn/code/js/04/8/gr66.jpg" alt=""></div>
<div class="frame" title="We succeeded to quantify the network."><img src="http://preview.zcool.com.cn/code/js/04/8/bl116.jpg" alt=""></div>
</div>
</div>
<script type="text/javascript">
/* ==== start script ==== */
sP.init();
onresize = sP.resize;
</script>
</body>
</html> | zzh-simple-hr | ZJs/webapp/my-js/image-div.html | HTML | art | 7,215 |
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>无JS固定位置的DIV(DIV模拟Body)</title>
<style type="text/css">
html,body{margin:0;padding:0;height:100%;overflow:hidden;}
#Nav{width:100%;position:absolute;top:0;left:0;color:#FFF;background:maroon;}
#Content{width:100%;height:100%;overflow:scroll;overflow-x:hidden;background:#FEFFEF;}
</style>
</head>
<body>
<div id="Nav">我是固定位置的DIV哦(*^__^*)</div>
<div id="Content">
<p style="padding-top:50px;">我是网站内容区域,我很长很长很长很长……</p>
<img src="http://www.smbey0nd.com/Demo/20080826/place.png" alt="我是图片占位符,我很高很高" />
<p style="padding-bottom:50px;">像Mario一样飞啊飞啊飞啊飞</p>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/my-js/fix-position-div.html | HTML | art | 812 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{}
#main{width:500px; margin:100px; height:500px;border:1px solid red}
#test{border:1px solid red;display:none;width:10px;height:10px; background:yellow}
</style>
<script type="text/javascript">
/*
popper.w code
class: XopenDiv
version: 1.0
date: 2008-5-19
*/
</script>
<title>Code By popper.w</title>
</head>
<body>
<input type="button" value="点击打开" id="bt" />
<input type="button" value="点击关闭" id="bt1" />
<div id="main">
<div id="test"></div>
</div>
</body>
</html>
<script type="text/javascript">
function $id(o){
return document.getElementById(o);
}
function XslideDown(obj,type,mX,num) {
if(!type){return;}
try{
var type1=type=="height"?"marginTop":"marginLeft";
var type2=type=="height"?"top":"left";
XSetCss(obj,[type1,XgetOffset(obj)[type2]+"px"]);
XSetCss(obj,[type,XgetOffset(obj)[type]+num+"px"]);
if(XgetOffset(obj)[type]<mX){
setTimeout(function(){XslideDown(obj,type,mX,num);},10);
}else{
XSetCss(obj,[type,mX])
}
}catch(e){}
}
function XslideUp(obj,type,mX,num) {
if(!type){return;}
try{
var type1=type=="height"?"marginTop":"marginLeft";
var type2=type=="height"?"top":"left";
XSetCss(obj,[type1,XgetOffset(obj)[type2]+"px"]);
XSetCss(obj,[type,XgetOffset(obj)[type]-num+"px"]);
if(XgetOffset(obj)[type]>mX){
setTimeout(function(){XslideUp(obj,type,mX,num);},1);
}else{
XSetCss(obj,[type,mX])
obj.style.display="none";
}
}catch(e){}
}
function XSetCss(obj,cssArgs){
if(arguments.length==2){
if(cssArgs.constructor==Object){
for(var o in cssArgs){
if(obj.style[o]!="undefiend"){
obj.style[o]=cssArgs[o];
}
}
}
if(cssArgs.constructor==Array&&cssArgs.length==2){
obj.style[cssArgs[0]]=cssArgs[1];
}
}
}
function XgetOffset(obj) {
return { height:obj.offsetHeight,
width:obj.offsetWidth,
top:parseInt((obj.parentNode.offsetHeight-obj.offsetHeight)/2),
left:parseInt((obj.parentNode.offsetWidth-obj.offsetWidth)/2)
};
}
function XopenDiv(o){
o.style.display="block";
XslideDown(o,"width",400,10);
XslideDown(o,"height",400,10);
}
function XcloseDiv(o){
XslideUp(o,"width",10,10);
XslideUp(o,"height",10,10);
}
//注册事件
$id("bt").onclick=function(){
XopenDiv($id("test"));
}
$id("bt1").onclick=function(){
XcloseDiv($id("test"));
}
</script>
| zzh-simple-hr | ZJs/webapp/my-js/area-cover.html | HTML | art | 3,127 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.15.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.15.custom.min.js"></script>
<script type="text/javascript">
$(function(){
// Accordion
$("#accordion").accordion({ header: "h3" });
// Tabs
$('#tabs').tabs();
// Dialog
$('#dialog').dialog({
autoOpen: false,
width: 600,
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
// Dialog Link
$('#dialog_link').click(function(){
$('#dialog').dialog('open');
return false;
});
// Datepicker
$('#datepicker').datepicker({
inline: true
});
// Slider
$('#slider').slider({
range: true,
values: [17, 67]
});
// Progressbar
$("#progressbar").progressbar({
value: 20
});
//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); },
function() { $(this).removeClass('ui-state-hover'); }
);
});
</script>
<style type="text/css">
/*demo page css*/
body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
.demoHeaders { margin-top: 2em; }
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}
</style>
</head>
<body>
<h1>Welcome to jQuery UI!</h1>
<p style="font-size: 1.3em; line-height: 1.5; margin: 1em 0; width: 50%;">This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of <a href="js/jquery-1.6.2.min.js">jQuery</a>, your personalized copy of <a href="js/jquery-ui-1.8.15.custom.min.js">jQuery UI (js/jquery-ui-1.8.15.custom.min.js)</a>, and <a href="css/ui-lightness/jquery-ui-1.8.15.custom.css">css/ui-lightness/jquery-ui-1.8.15.custom.css</a> which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs. </p>
<p style="font-size: 1.2em; line-height: 1.5; margin: 1em 0; width: 50%;">You've downloaded components and a theme that are compatible with jQuery 1.3+. Please make sure you are using jQuery 1.3+ in your production environment.</p>
<p style="font-weight: bold; margin: 2em 0 1em; font-size: 1.3em;">YOUR COMPONENTS:</p>
<!-- Accordion -->
<h2 class="demoHeaders">Accordion</h2>
<div id="accordion">
<div>
<h3><a href="#">First</a></h3>
<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
</div>
<div>
<h3><a href="#">Second</a></h3>
<div>Phasellus mattis tincidunt nibh.</div>
</div>
<div>
<h3><a href="#">Third</a></h3>
<div>Nam dui erat, auctor a, dignissim quis.</div>
</div>
</div>
<!-- Tabs -->
<h2 class="demoHeaders">Tabs</h2>
<div id="tabs">
<ul>
<li><a href="#tabs-1">First</a></li>
<li><a href="#tabs-2">Second</a></li>
<li><a href="#tabs-3">Third</a></li>
</ul>
<div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
<div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div>
<div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div>
</div>
<!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller-->
<h2 class="demoHeaders">Dialog</h2>
<p><a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p>
<h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2>
<div style="position: relative; width: 96%; height: 200px; padding:1% 4%; overflow:hidden;" class="fakewindowcontain">
<p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p>
<!-- ui-dialog -->
<div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div>
<div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all">
<div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>
<!-- ui-dialog -->
<div id="dialog" title="Dialog Title">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<h2 class="demoHeaders">Framework Icons (content color preview)</h2>
<ul id="icons" class="ui-widget ui-helper-clearfix">
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li>
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li>
</ul>
<!-- Slider -->
<h2 class="demoHeaders">Slider</h2>
<div id="slider"></div>
<!-- Datepicker -->
<h2 class="demoHeaders">Datepicker</h2>
<div id="datepicker"></div>
<!-- Progressbar -->
<h2 class="demoHeaders">Progressbar</h2>
<div id="progressbar"></div>
<!-- Highlight / Error -->
<h2 class="demoHeaders">Highlight / Error</h2>
<div class="ui-widget">
<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<strong>Hey!</strong> Sample ui-state-highlight style.</p>
</div>
</div>
<br/>
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
<strong>Alert:</strong> Sample ui-state-error style.</p>
</div>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/index.html | HTML | art | 31,575 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI switchClass</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/switchClass?section=1" title="Edit section: switchClass( remove, add, [duration] )">edit</a>]</div><a name="switchClass.28_remove.2C_add.2C_.5Bduration.5D_.29"></a><h3>switchClass( remove, add, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
<p>Switches from the class defined in the first argument to the class defined as second argument, using an optional transition.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Switch the class 'highlight' to 'blue' when a paragraph is clicked with a one second transition.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">switchClass</strong>("highlight", "blue", 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<style type="text/css">
p { margin: 4px; font-size:16px; font-weight:bolder;
cursor:pointer; }
.blue { background: blue; }
.highlight { background:yellow; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">switchClass</strong>("highlight", "blue", 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p class="highlight">Click to switch</p>
<p class="highlight">to blue</p>
<p class="highlight">on these</p>
<p class="highlight">paragraphs</p>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-remove">
<div class="option-header">
<h3 class="option-name"><a href="#option-remove">remove</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The CSS class that will be removed.</p>
</div>
</li>
<li class="option" id="option-add">
<div class="option-header">
<h3 class="option-name"><a href="#option-add">add</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The CSS class that will be added.</p>
</div>
</li>
<li class="option" id="option-duration">
<div class="option-header">
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 5818 bytes
Post-expand include size: 7682 bytes
Template argument size: 4812 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2609-1!1!0!!en!2 and timestamp 20110801225013 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/switchClass.html | HTML | art | 4,659 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Autocomplete</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>Autocomplete, when added to an input field, enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.</p>
<p>By giving an Autocomplete field focus or entering something into it, the plugin starts searching for entries that match and displays a list of values to choose from. By entering more characters, the user can filter down the list to better matches.</p>
<p>This can be used to enter previous selected values, for example you could use Autocomplete for entering tags, to complete an address, you could enter a city name and get the zip code, or maybe enter email addresses from an address book.</p>
<p>You can pull data in from a local and/or a remote source: Local is good for small data sets (like an address book with 50 entries), remote is necessary for big data sets, like a database with hundreds or millions of entries to select from.</p>
<p>Autocomplete can be customized to work with various data sources, by just specifying the source option. A data source can be:</p>
<ul>
<li>an Array with local data</li>
<li>a String, specifying a URL</li>
<li>a Callback</li>
</ul>
<p>The local data can be a simple Array of Strings, or it contains Objects for each item in the array, with either a label or value property or both. The label property is displayed in the suggestion menu. The value will be inserted into the input element after the user selected something from the menu. If just one property is specified, it will be used for both, eg. if you provide only value-properties, the value will also be used as the label.</p>
<p>When a String is used, the Autocomplete plugin expects that string to point to a URL resource that will return JSON data. It can be on the same host or on a different one (must provide JSONP). The request parameter "term" gets added to that URL. The data itself can be in the same format as the local data described above.</p>
<p>The third variation, the callback, provides the most flexibility, and can be used to connect any data source to Autocomplete. The callback gets two arguments:</p>
<ul>
<li>A request object, with a single property called "term", which refers to the value currently in the text input. For example, when the user entered "new yo" in a city field, the Autocomplete term will equal "new yo".</li>
<li>A response callback, which expects a single argument to contain the data to suggest to the user. This data should be filtered based on the provided term, and can be in any of the formats described above for simple local data (String-Array or Object-Array with label/value/both properties). It's important when providing a custom source callback to handle errors during the request. You must always call the response callback even if you encounter an error. This ensures that the widget always has the correct state.</li>
</ul>
<p>The label is always treated as text, if you want the label to be treated as html you can use <a href="https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js" class="external text" title="https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js">Scott González' html extension</a>. The demos all focus on different variations of the source-option - look for the one that matches your use case, and take a look at the code.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Position</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="300">
A simple jQuery UI Autocomplete.<br />
</p>
<pre>$("input#autocomplete").autocomplete({
source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("input#autocomplete").autocomplete({
source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
});
});
</script>
</head>
<body style="font-size:62.5%;">
<input id="autocomplete" />
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the autocomplete. Can be set when initialising (first creating) the autocomplete.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).autocomplete( "option", "disabled" );
//setter
$( ".selector" ).autocomplete( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-appendTo">
<div class="option-header">
<h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"body"</dd>
</dl>
</div>
<div class="option-description">
<p>Which element the menu should be appended to.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>appendTo</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ appendTo: "#someElem" });</code></pre>
</dd>
<dt>
Get or set the <code>appendTo</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var appendTo = $( ".selector" ).autocomplete( "option", "appendTo" );
//setter
$( ".selector" ).autocomplete( "option", "appendTo", "#someElem" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoFocus">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoFocus">autoFocus</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true the first item will be automatically focused.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>autoFocus</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ autoFocus: true });</code></pre>
</dd>
<dt>
Get or set the <code>autoFocus</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoFocus = $( ".selector" ).autocomplete( "option", "autoFocus" );
//setter
$( ".selector" ).autocomplete( "option", "autoFocus", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">300</dd>
</dl>
</div>
<div class="option-description">
<p>The delay in milliseconds the Autocomplete waits after a keystroke to activate itself. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ delay: 0 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).autocomplete( "option", "delay" );
//setter
$( ".selector" ).autocomplete( "option", "delay", 0 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minLength">
<div class="option-header">
<h3 class="option-name"><a href="#option-minLength">minLength</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>The minimum number of characters a user has to type before the Autocomplete activates. Zero is useful for local data with just a few items. Should be increased when there are a lot of items, where a single character would match a few thousand items.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>minLength</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ minLength: 0 });</code></pre>
</dd>
<dt>
Get or set the <code>minLength</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minLength = $( ".selector" ).autocomplete( "option", "minLength" );
//setter
$( ".selector" ).autocomplete( "option", "minLength", 0 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-position">
<div class="option-header">
<h3 class="option-name"><a href="#option-position">position</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">{ my: "left top", at: "left bottom", collision: "none" }</dd>
</dl>
</div>
<div class="option-description">
<p>Identifies the position of the Autocomplete widget in relation to the associated input element. The "of" option defaults to the input element, but you can specify another element to position against. You can refer to the <a href="http://docs.jquery.com/UI/Position" class="external text" title="http://docs.jquery.com/UI/Position">jQuery UI Position</a> utility for more details about the various options.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>position</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ position: { my : "right top", at: "right bottom" } });</code></pre>
</dd>
<dt>
Get or set the <code>position</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var position = $( ".selector" ).autocomplete( "option", "position" );
//setter
$( ".selector" ).autocomplete( "option", "position", { my : "right top", at: "right bottom" } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-source">
<div class="option-header">
<h3 class="option-name"><a href="#option-source">source</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Array, Callback</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">none, must be specified</dd>
</dl>
</div>
<div class="option-description">
<p>Defines the data to use, must be specified. See Overview section for more details, and look at the various demos.
</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a autocomplete with the <code>source</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({ source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] });</code></pre>
</dd>
<dt>
Get or set the <code>source</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var source = $( ".selector" ).autocomplete( "option", "source" );
//setter
$( ".selector" ).autocomplete( "option", "source", ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompletecreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when autocomplete is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>autocompletecreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompletecreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-search">
<div class="event-header">
<h3 class="event-name"><a href="#event-search">search</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompletesearch</dd>
</dl>
</div>
<div class="event-description">
<p>Before a request (source-option) is started, after minLength and delay are met. Can be canceled (return false), then no request will be started and no items suggested.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>search</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
search: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>search</code> event by type: <code>autocompletesearch</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompletesearch", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-open">
<div class="event-header">
<h3 class="event-name"><a href="#event-open">open</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompleteopen</dd>
</dl>
</div>
<div class="event-description">
<p>Triggered when the suggestion menu is opened.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>open</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
open: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>open</code> event by type: <code>autocompleteopen</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompleteopen", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-focus">
<div class="event-header">
<h3 class="event-name"><a href="#event-focus">focus</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompletefocus</dd>
</dl>
</div>
<div class="event-description">
<p>Before focus is moved to an item (not selecting), ui.item refers to the focused item. The default action of focus is to replace the text field's value with the value of the focused item, though only if the focus event was triggered by a keyboard interaction. Canceling this event prevents the value from being updated, but does not prevent the menu item from being focused.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>focus</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
focus: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>focus</code> event by type: <code>autocompletefocus</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompletefocus", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-select">
<div class="event-header">
<h3 class="event-name"><a href="#event-select">select</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompleteselect</dd>
</dl>
</div>
<div class="event-description">
<p>Triggered when an item is selected from the menu; ui.item refers to the selected item. The default action of select is to replace the text field's value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>select</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
select: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>select</code> event by type: <code>autocompleteselect</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompleteselect", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-close">
<div class="event-header">
<h3 class="event-name"><a href="#event-close">close</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompleteclose</dd>
</dl>
</div>
<div class="event-description">
<p>When the list is hidden - doesn't have to occur together with a change.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>close</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
close: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>close</code> event by type: <code>autocompleteclose</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompleteclose", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-change">
<div class="event-header">
<h3 class="event-name"><a href="#event-change">change</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">autocompletechange</dd>
</dl>
</div>
<div class="event-description">
<p>Triggered when the field is blurred, if the value has changed; ui.item refers to the selected item.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>change</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).autocomplete({
change: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>change</code> event by type: <code>autocompletechange</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "autocompletechange", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the autocomplete functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the autocomplete.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the autocomplete.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any autocomplete option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple autocomplete options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-autocomplete element.</p>
</div>
</li>
<li class="method" id="method-search">
<div class="method-header">
<h3 class="method-name"><a href="#method-search">search</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "search"
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Triggers a search event, which, when data is available, then will display the suggestions; can be used by a selectbox-like button to open the suggestions when clicked. If no value argument is specified, the current input's value is used. Can be called with an empty string and minLength: 0 to display all items.</p>
</div>
</li>
<li class="method" id="method-close">
<div class="method-header">
<h3 class="method-name"><a href="#method-close">close</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.autocomplete( "close"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Close the Autocomplete menu. Useful in combination with the search method, to close the open menu.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Autocomplete plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.autocomplete.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<input class="<strong>ui-autocomplete-input</strong>"/><br />
<ul class="<strong>ui-autocomplete</strong> <strong>ui-menu</strong> ui-widget ui-widget-content ui-corner-all"><br />
<li class="<strong>ui-menu-item</strong>"><br />
<a class="ui-corner-all">item 1</a><br />
</li><br />
<li class="<strong>ui-menu-item</strong>"><br />
<a class="ui-corner-all">item 2</a><br />
</li><br />
<li class="<strong>ui-menu-item</strong>"><br />
<a class="ui-corner-all">item 3</a><br />
</li><br />
</ul>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the autocomplete plugin, not markup you should use to create a autocomplete. The only markup needed for that is <input/>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 35954 bytes
Post-expand include size: 60499 bytes
Template argument size: 33522 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3766-1!1!0!!en!2 and timestamp 20110802001240 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/autocomplete.html | HTML | art | 27,530 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Selectable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Also, elements can be selected by click or drag while holding the Ctrl/Meta key, allowing for multiple (non-contiguous) selections.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="">
A simple jQuery UI Selectable.<br />
</p>
<pre>$("#selectable").selectable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#selectable .ui-selecting {
background: silver;
}
#selectable .ui-selected {
background: gray;
}
</style>
<script>
$(document).ready(function() {
$("#selectable").selectable();
});
</script>
</head>
<body style="font-size:62.5%;">
<ul id="selectable">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the selectable. Can be set when initialising (first creating) the selectable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).selectable( "option", "disabled" );
//setter
$( ".selector" ).selectable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoRefresh">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoRefresh">autoRefresh</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>autoRefresh</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ autoRefresh: false });</code></pre>
</dd>
<dt>
Get or set the <code>autoRefresh</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoRefresh = $( ".selector" ).selectable( "option", "autoRefresh" );
//setter
$( ".selector" ).selectable( "option", "autoRefresh", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cancel">
<div class="option-header">
<h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">':input,option'</dd>
</dl>
</div>
<div class="option-description">
<p>Prevents selecting if you start on elements matching the selector.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>cancel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ cancel: ':input,option' });</code></pre>
</dd>
<dt>
Get or set the <code>cancel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cancel = $( ".selector" ).selectable( "option", "cancel" );
//setter
$( ".selector" ).selectable( "option", "cancel", ':input,option' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Time in milliseconds to define when the selecting should start. It helps preventing unwanted selections when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ delay: 20 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).selectable( "option", "delay" );
//setter
$( ".selector" ).selectable( "option", "delay", 20 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-distance">
<div class="option-header">
<h3 class="option-name"><a href="#option-distance">distance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Tolerance, in pixels, for when selecting should start. If specified, selecting will not start until after mouse is dragged beyond distance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>distance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ distance: 20 });</code></pre>
</dd>
<dt>
Get or set the <code>distance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var distance = $( ".selector" ).selectable( "option", "distance" );
//setter
$( ".selector" ).selectable( "option", "distance", 20 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-filter">
<div class="option-header">
<h3 class="option-name"><a href="#option-filter">filter</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'*'</dd>
</dl>
</div>
<div class="option-description">
<p>The matching child elements will be made selectees (able to be selected).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>filter</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ filter: 'li' });</code></pre>
</dd>
<dt>
Get or set the <code>filter</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var filter = $( ".selector" ).selectable( "option", "filter" );
//setter
$( ".selector" ).selectable( "option", "filter", 'li' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-tolerance">
<div class="option-header">
<h3 class="option-name"><a href="#option-tolerance">tolerance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'touch'</dd>
</dl>
</div>
<div class="option-description">
<p>Possible values: 'touch', 'fit'.
</p>
<ul>
<li><b>fit</b>: draggable overlaps the droppable entirely</li>
<li><b>touch</b>: draggable overlaps the droppable any amount</li>
</ul>
<p></p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a selectable with the <code>tolerance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({ tolerance: 'fit' });</code></pre>
</dd>
<dt>
Get or set the <code>tolerance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var tolerance = $( ".selector" ).selectable( "option", "tolerance" );
//setter
$( ".selector" ).selectable( "option", "tolerance", 'fit' );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectablecreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when selectable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>selectablecreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectablecreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-selected">
<div class="event-header">
<h3 class="event-name"><a href="#event-selected">selected</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectableselected</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the end of the select operation, on each element added to the selection.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>selected</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
selected: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>selected</code> event by type: <code>selectableselected</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectableselected", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-selecting">
<div class="event-header">
<h3 class="event-name"><a href="#event-selecting">selecting</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectableselecting</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered during the select operation, on each element added to the selection.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>selecting</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
selecting: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>selecting</code> event by type: <code>selectableselecting</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectableselecting", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectablestart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the beginning of the select operation.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>selectablestart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectablestart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectablestop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the end of the select operation.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>selectablestop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectablestop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-unselected">
<div class="event-header">
<h3 class="event-name"><a href="#event-unselected">unselected</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectableunselected</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the end of the select operation, on each element removed from the selection.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>unselected</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
unselected: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>unselected</code> event by type: <code>selectableunselected</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectableunselected", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-unselecting">
<div class="event-header">
<h3 class="event-name"><a href="#event-unselecting">unselecting</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">selectableunselecting</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered during the select operation, on each element removed from the selection.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>unselecting</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).selectable({
unselecting: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>unselecting</code> event by type: <code>selectableunselecting</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "selectableunselecting", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the selectable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the selectable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the selectable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any selectable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple selectable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-selectable element.</p>
</div>
</li>
<li class="method" id="method-refresh">
<div class="method-header">
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.selectable( "refresh"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Refresh the position and size of each selectee element. This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Selectable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.selectable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<ul class="<strong>ui-selectable</strong>"><br />
   <li class="<strong>ui-selectee</strong>"></li><br />
   <li class="<strong>ui-selectee</strong>"></li><br />
   <li class="<strong>ui-selectee</strong>"></li><br />
</ul>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the selectable plugin, not markup you should use to create a selectable. The only markup needed for that is <br /><ul><br />
   <li></li><br />
   <li></li><br />
   <li></li><br />
</ul>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 34703 bytes
Post-expand include size: 54220 bytes
Template argument size: 27222 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3771-1!1!0!!en!2 and timestamp 20110801231428 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/selectable.html | HTML | art | 22,157 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Draggable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Draggable plugin makes selected elements draggable by mouse.</p>
<p>Draggable elements gets a class of <code>ui-draggable</code>. During drag the element also gets a class of <code>ui-draggable-dragging</code>. If you want not just drag, but drag-and-drop, see the jQuery UI Droppable plugin, which provides a drop target for draggables.</p>
<p>All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p>
<ul>
<li><b>ui.helper</b> - the jQuery object representing the helper that's being dragged</li>
<li><b>ui.position</b> - current position of the helper as { top, left } object, relative to the offset element</li>
<li><b>ui.offset</b> - current absolute position of the helper as { top, left } object, relative to page</li>
</ul>
<p><br />
</p>
<p>To manipulate the position of a draggable during drag, you can either <a href="http://jsbin.com/etako/edit" class="external text" title="http://jsbin.com/etako/edit">use a wrapper as the draggable helper</a> and position the wrapped element with absolute positioning, or you can correct internal values like so: <code>$(this).data('draggable').offset.click.top -= x</code>.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Initialize a draggable with default options.<br />
</p>
<pre>$("#draggable").draggable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#draggable { width: 100px; height: 70px; background: silver; }
</style>
<script>
$(document).ready(function() {
$("#draggable").draggable();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="draggable">Drag me</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the draggable. Can be set when initialising (first creating) the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).draggable( "option", "disabled" );
//setter
$( ".selector" ).draggable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-addClasses">
<div class="option-header">
<h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to false, will prevent the <code>ui-draggable</code> class from being added. This may be desired as a performance optimization when calling <code>.draggable()</code> init on many hundreds of elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>addClasses</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ addClasses: false });</code></pre>
</dd>
<dt>
Get or set the <code>addClasses</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var addClasses = $( ".selector" ).draggable( "option", "addClasses" );
//setter
$( ".selector" ).draggable( "option", "addClasses", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-appendTo">
<div class="option-header">
<h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Element, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'parent'</dd>
</dl>
</div>
<div class="option-description">
<p>The element passed to or selected by the <code>appendTo</code> option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>appendTo</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ appendTo: 'body' });</code></pre>
</dd>
<dt>
Get or set the <code>appendTo</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var appendTo = $( ".selector" ).draggable( "option", "appendTo" );
//setter
$( ".selector" ).draggable( "option", "appendTo", 'body' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-axis">
<div class="option-header">
<h3 class="option-name"><a href="#option-axis">axis</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>axis</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ axis: 'x' });</code></pre>
</dd>
<dt>
Get or set the <code>axis</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var axis = $( ".selector" ).draggable( "option", "axis" );
//setter
$( ".selector" ).draggable( "option", "axis", 'x' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cancel">
<div class="option-header">
<h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">':input,option'</dd>
</dl>
</div>
<div class="option-description">
<p>Prevents dragging from starting on specified elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cancel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cancel: 'button' });</code></pre>
</dd>
<dt>
Get or set the <code>cancel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cancel = $( ".selector" ).draggable( "option", "cancel" );
//setter
$( ".selector" ).draggable( "option", "cancel", 'button' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-connectToSortable">
<div class="option-header">
<h3 class="option-name"><a href="#option-connectToSortable">connectToSortable</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Allows the draggable to be dropped onto the specified sortables. If this option is used (<code>helper</code> must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it.
</p><p>Note: Specifying this option as an array of selectors has been removed.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>connectToSortable</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ connectToSortable: 'ul#myList' });</code></pre>
</dd>
<dt>
Get or set the <code>connectToSortable</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var connectToSortable = $( ".selector" ).draggable( "option", "connectToSortable" );
//setter
$( ".selector" ).draggable( "option", "connectToSortable", 'ul#myList' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-containment">
<div class="option-header">
<h3 class="option-name"><a href="#option-containment">containment</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Element, String, Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>containment</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ containment: 'parent' });</code></pre>
</dd>
<dt>
Get or set the <code>containment</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var containment = $( ".selector" ).draggable( "option", "containment" );
//setter
$( ".selector" ).draggable( "option", "containment", 'parent' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursor">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursor">cursor</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'auto'</dd>
</dl>
</div>
<div class="option-description">
<p>The css cursor during the drag operation.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cursor</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cursor: 'crosshair' });</code></pre>
</dd>
<dt>
Get or set the <code>cursor</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursor = $( ".selector" ).draggable( "option", "cursor" );
//setter
$( ".selector" ).draggable( "option", "cursor", 'crosshair' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursorAt">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursorAt">cursorAt</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Sets the offset of the dragging helper relative to the mouse cursor. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cursorAt</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cursorAt: { left: 5 } });</code></pre>
</dd>
<dt>
Get or set the <code>cursorAt</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursorAt = $( ".selector" ).draggable( "option", "cursorAt" );
//setter
$( ".selector" ).draggable( "option", "cursorAt", { left: 5 } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ delay: 500 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).draggable( "option", "delay" );
//setter
$( ".selector" ).draggable( "option", "delay", 500 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-distance">
<div class="option-header">
<h3 class="option-name"><a href="#option-distance">distance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>distance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ distance: 30 });</code></pre>
</dd>
<dt>
Get or set the <code>distance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var distance = $( ".selector" ).draggable( "option", "distance" );
//setter
$( ".selector" ).draggable( "option", "distance", 30 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-grid">
<div class="option-header">
<h3 class="option-name"><a href="#option-grid">grid</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y]</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>grid</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ grid: [50, 20] });</code></pre>
</dd>
<dt>
Get or set the <code>grid</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var grid = $( ".selector" ).draggable( "option", "grid" );
//setter
$( ".selector" ).draggable( "option", "grid", [50, 20] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-handle">
<div class="option-header">
<h3 class="option-name"><a href="#option-handle">handle</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Element, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If specified, restricts drag start click to the specified element(s).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>handle</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ handle: 'h2' });</code></pre>
</dd>
<dt>
Get or set the <code>handle</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var handle = $( ".selector" ).draggable( "option", "handle" );
//setter
$( ".selector" ).draggable( "option", "handle", 'h2' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-helper">
<div class="option-header">
<h3 class="option-name"><a href="#option-helper">helper</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'original'</dd>
</dl>
</div>
<div class="option-description">
<p>Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>helper</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ helper: 'clone' });</code></pre>
</dd>
<dt>
Get or set the <code>helper</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var helper = $( ".selector" ).draggable( "option", "helper" );
//setter
$( ".selector" ).draggable( "option", "helper", 'clone' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-iframeFix">
<div class="option-header">
<h3 class="option-name"><a href="#option-iframeFix">iframeFix</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>iframeFix</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ iframeFix: true });</code></pre>
</dd>
<dt>
Get or set the <code>iframeFix</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var iframeFix = $( ".selector" ).draggable( "option", "iframeFix" );
//setter
$( ".selector" ).draggable( "option", "iframeFix", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-opacity">
<div class="option-header">
<h3 class="option-name"><a href="#option-opacity">opacity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Float</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Opacity for the helper while being dragged.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>opacity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ opacity: 0.35 });</code></pre>
</dd>
<dt>
Get or set the <code>opacity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var opacity = $( ".selector" ).draggable( "option", "opacity" );
//setter
$( ".selector" ).draggable( "option", "opacity", 0.35 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-refreshPositions">
<div class="option-header">
<h3 class="option-name"><a href="#option-refreshPositions">refreshPositions</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>refreshPositions</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ refreshPositions: true });</code></pre>
</dd>
<dt>
Get or set the <code>refreshPositions</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var refreshPositions = $( ".selector" ).draggable( "option", "refreshPositions" );
//setter
$( ".selector" ).draggable( "option", "refreshPositions", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-revert">
<div class="option-header">
<h3 class="option-name"><a href="#option-revert">revert</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>revert</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ revert: true });</code></pre>
</dd>
<dt>
Get or set the <code>revert</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var revert = $( ".selector" ).draggable( "option", "revert" );
//setter
$( ".selector" ).draggable( "option", "revert", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-revertDuration">
<div class="option-header">
<h3 class="option-name"><a href="#option-revertDuration">revertDuration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">500</dd>
</dl>
</div>
<div class="option-description">
<p>The duration of the revert animation, in milliseconds. Ignored if revert is false.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>revertDuration</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ revertDuration: 1000 });</code></pre>
</dd>
<dt>
Get or set the <code>revertDuration</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var revertDuration = $( ".selector" ).draggable( "option", "revertDuration" );
//setter
$( ".selector" ).draggable( "option", "revertDuration", 1000 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scope">
<div class="option-header">
<h3 class="option-name"><a href="#option-scope">scope</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'default'</dd>
</dl>
</div>
<div class="option-description">
<p>Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scope</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scope: 'tasks' });</code></pre>
</dd>
<dt>
Get or set the <code>scope</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scope = $( ".selector" ).draggable( "option", "scope" );
//setter
$( ".selector" ).draggable( "option", "scope", 'tasks' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scroll">
<div class="option-header">
<h3 class="option-name"><a href="#option-scroll">scroll</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, container auto-scrolls while dragging.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scroll</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scroll: false });</code></pre>
</dd>
<dt>
Get or set the <code>scroll</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scroll = $( ".selector" ).draggable( "option", "scroll" );
//setter
$( ".selector" ).draggable( "option", "scroll", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSensitivity">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSensitivity">scrollSensitivity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scrollSensitivity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scrollSensitivity: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSensitivity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSensitivity = $( ".selector" ).draggable( "option", "scrollSensitivity" );
//setter
$( ".selector" ).draggable( "option", "scrollSensitivity", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSpeed">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSpeed">scrollSpeed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>The speed at which the window should scroll once the mouse pointer gets within the <code>scrollSensitivity</code> distance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scrollSpeed</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scrollSpeed: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSpeed</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSpeed = $( ".selector" ).draggable( "option", "scrollSpeed" );
//setter
$( ".selector" ).draggable( "option", "scrollSpeed", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snap">
<div class="option-header">
<h3 class="option-name"><a href="#option-snap">snap</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snap</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snap: true });</code></pre>
</dd>
<dt>
Get or set the <code>snap</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snap = $( ".selector" ).draggable( "option", "snap" );
//setter
$( ".selector" ).draggable( "option", "snap", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snapMode">
<div class="option-header">
<h3 class="option-name"><a href="#option-snapMode">snapMode</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'both'</dd>
</dl>
</div>
<div class="option-description">
<p>Determines which edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both'</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snapMode</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snapMode: 'outer' });</code></pre>
</dd>
<dt>
Get or set the <code>snapMode</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snapMode = $( ".selector" ).draggable( "option", "snapMode" );
//setter
$( ".selector" ).draggable( "option", "snapMode", 'outer' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snapTolerance">
<div class="option-header">
<h3 class="option-name"><a href="#option-snapTolerance">snapTolerance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>The distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snapTolerance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snapTolerance: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>snapTolerance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snapTolerance = $( ".selector" ).draggable( "option", "snapTolerance" );
//setter
$( ".selector" ).draggable( "option", "snapTolerance", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-stack">
<div class="option-header">
<h3 class="option-name"><a href="#option-stack">stack</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Controls the z-Index of the set of elements that match the selector, always brings to front the dragged item. Very useful in things like window managers.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>stack</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ stack: ".products" });</code></pre>
</dd>
<dt>
Get or set the <code>stack</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var stack = $( ".selector" ).draggable( "option", "stack" );
//setter
$( ".selector" ).draggable( "option", "stack", ".products" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-zIndex">
<div class="option-header">
<h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>z-index for the helper while being dragged.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>zIndex</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ zIndex: 2700 });</code></pre>
</dd>
<dt>
Get or set the <code>zIndex</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var zIndex = $( ".selector" ).draggable( "option", "zIndex" );
//setter
$( ".selector" ).draggable( "option", "zIndex", 2700 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when draggable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>dragcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragstart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dragging starts.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>dragstart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragstart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-drag">
<div class="event-header">
<h3 class="event-name"><a href="#event-drag">drag</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">drag</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the mouse is moved during the dragging.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>drag</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
drag: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>drag</code> event by type: <code>drag</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "drag", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragstop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dragging stops.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>dragstop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragstop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the draggable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the draggable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the draggable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any draggable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple draggable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-draggable element.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Draggable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.draggable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-draggable</strong>"></div>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the draggable plugin, not markup you should use to create a draggable. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 61392 bytes
Post-expand include size: 107565 bytes
Template argument size: 58710 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3768-1!1!0!!en!2 and timestamp 20110801235548 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/draggable.html | HTML | art | 42,728 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Button</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>Button enhances standard form elements like button, input of type submit or reset or anchors to themable buttons with appropiate mouseover and active styles.</p>
<p>In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons: Their associated label is styled to appear as the button, while the underlying input is updated on click.</p>
<p>In order to group radio buttons, Button also provides an additional widget-method, called Buttonset. Its used by selecting a container element (which contains the radio buttons) and calling buttonset(). Buttonset will also provide visual grouping, and therefore should be used whenever you have a group of buttons. It works by selecting all descendents and applying button() to them. You can enable and disable a buttonset, which will enable and disable all contained buttons. Destroying a buttonset also calls the button's destroy method.</p>
<p>When using an input of type button, submit or reset, support is limited to plain text labels with no icons.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="300">
A simple jQuery UI Button.<br />
</p>
<pre>$("button").button();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("button").button();
});
</script>
</head>
<body style="font-size:62.5%;">
<button>Button label</button>
</body>
</html>
</pre>
<p></div>
</p><p></div>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<div id="demo" class="tabs-container" rel="300">
A simple jQuery UI Button.<br />
</p>
<pre>$("#radio").buttonset();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#radio").buttonset();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the button. Can be set when initialising (first creating) the button.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a button with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).button({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).button( "option", "disabled" );
//setter
$( ".selector" ).button( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-text">
<div class="option-header">
<h3 class="option-name"><a href="#option-text">text</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>Whether to show any text - when set to false (display no text), icons (see icons option) must be enabled, otherwise it'll be ignored.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a button with the <code>text</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).button({ text: false });</code></pre>
</dd>
<dt>
Get or set the <code>text</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var text = $( ".selector" ).button( "option", "text" );
//setter
$( ".selector" ).button( "option", "text", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-icons">
<div class="option-header">
<h3 class="option-name"><a href="#option-icons">icons</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Options</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">{ primary: null, secondary: null }</dd>
</dl>
</div>
<div class="option-description">
<p>Icons to display, with or without text (see text option). The primary icon is displayed by default on the left of the label text, the secondary by default is on the right. Value for the primary and secondary properties must be a classname (String), eg. "ui-icon-gear". For using only one icon: icons: {primary:'ui-icon-locked'}. For using two icons: icons: {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a button with the <code>icons</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).button({ icons: {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'} });</code></pre>
</dd>
<dt>
Get or set the <code>icons</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var icons = $( ".selector" ).button( "option", "icons" );
//setter
$( ".selector" ).button( "option", "icons", {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'} );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-label">
<div class="option-header">
<h3 class="option-name"><a href="#option-label">label</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">HTML content of the button, or value attribute</dd>
</dl>
</div>
<div class="option-description">
<p>Text to show on the button. When not specified (null), the element's html content is used, or its value attribute when it's an input element of type submit or reset; or the html content of the associated label element if its an input of type radio or checkbox</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a button with the <code>label</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).button({ label: "custom label" });</code></pre>
</dd>
<dt>
Get or set the <code>label</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var label = $( ".selector" ).button( "option", "label" );
//setter
$( ".selector" ).button( "option", "label", "custom label" );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">buttoncreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when button is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).button({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>buttoncreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "buttoncreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</p>
<p>There are no events for this plugin.</p>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the button functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<p>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the button.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the button.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any button option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple button options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-button element.</p>
</div>
</li>
<li class="method" id="method-refresh">
<div class="method-header">
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.button( "refresh"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Refreshes the visual state of the button. Useful for updating button state after the native element's checked or disabled state is changed programatically.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Button plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.button.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<button class="<strong>ui-button ui-button-text-only</strong> ui-widget ui-state-default ui-corner-all"><br />
<span class="<strong>ui-button-text</strong>">Button Label</span><br /></button>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the button plugin, not markup you should use to create a button. The only markup needed for that is <button>Button Label</button>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 24507 bytes
Post-expand include size: 31304 bytes
Template argument size: 13881 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3767-1!1!0!!en!2 and timestamp 20110801231436 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/button.html | HTML | art | 14,929 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI show</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/show?section=1" title="Edit section: show( effect, [options], [speed], [callback] )">edit</a>]</div><a name="show.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>show( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
<p>The enhanced show method optionally accepts jQuery UI advanced effects.</p>
<p>Uses a specific effect on an element to show the element if the first argument is a effect string.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Apply the effect slide if you click on the p to show a div.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">show</strong>("slide", {}, 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
<style type="text/css">
div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">show</strong>("slide", {}, 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me</p><div></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-effect">
<div class="option-header">
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
</div>
</li>
<li class="option" id="option-options">
<div class="option-header">
<h3 class="option-name"><a href="#option-options">options</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Hash</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A object/hash including specific options for the effect.</p>
</div>
</li>
<li class="option" id="option-speed">
<div class="option-header">
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
<li class="option" id="option-callback">
<div class="option-header">
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A function that is called after the effect is completed.</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 6354 bytes
Post-expand include size: 8726 bytes
Template argument size: 5452 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2613-1!1!0!!en!2 and timestamp 20110801224259 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/show.html | HTML | art | 5,272 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI toggleClass</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/toggleClass?section=1" title="Edit section: toggleClass( class, [duration] )">edit</a>]</div><a name="toggleClass.28_class.2C_.5Bduration.5D_.29"></a><h3>toggleClass( class, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
<p>Adds the specified class if it is not present, and removes the specified class if it is present, using an optional transition.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
Adds the 'selected' class if it is not present, and removes the 'selected' class if it is present.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">toggleClass</strong>("selected", 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<style type="text/css">
p { cursor: pointer; font-size: 1.2em; }
.selected { color:red; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">toggleClass</strong>("selected", 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me to toggle 'selected' class.</p>
<p class="selected">Click me to toggle 'selected' class.</p>
<p>Click me to toggle 'selected' class.</p>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-class">
<div class="option-header">
<h3 class="option-name"><a href="#option-class">class</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>A CSS class to toggle on the elements.</p>
</div>
</li>
<li class="option" id="option-duration">
<div class="option-header">
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 5271 bytes
Post-expand include size: 7027 bytes
Template argument size: 4437 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2608-1!1!0!!en!2 and timestamp 20110801224240 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/toggleClass.html | HTML | art | 4,140 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Progressbar</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>
The progress bar is designed to simply display the current % complete for a process. The bar is coded to be flexibly sized through CSS and will scale to fit inside it's parent container by default.
</p>
<p>
This is a determinate progress bar, meaning that it should only be used in situations where the system can accurately update the current status complete. A determinate progress bar should never fill from left to right, then loop back to empty for a single process -- if the actual percent complete status cannot be calculated, an indeterminate progress bar (coming soon) or spinner animation is a better way to provide user feedback.
</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
A simple jQuery UI Progressbar.<br />
</p>
<pre>$("#progressbar").progressbar({ value: 37 });
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#progressbar").progressbar({ value: 37 });
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="progressbar"></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the progressbar. Can be set when initialising (first creating) the progressbar.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a progressbar with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).progressbar({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).progressbar( "option", "disabled" );
//setter
$( ".selector" ).progressbar( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-value">
<div class="option-header">
<h3 class="option-name"><a href="#option-value">value</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>The value of the progressbar.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a progressbar with the <code>value</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).progressbar({ value: 37 });</code></pre>
</dd>
<dt>
Get or set the <code>value</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var value = $( ".selector" ).progressbar( "option", "value" );
//setter
$( ".selector" ).progressbar( "option", "value", 37 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">progressbarcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when progressbar is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).progressbar({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>progressbarcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "progressbarcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-change">
<div class="event-header">
<h3 class="event-name"><a href="#event-change">change</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">progressbarchange</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the value of the progressbar changes.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>change</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).progressbar({
change: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>change</code> event by type: <code>progressbarchange</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "progressbarchange", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-complete">
<div class="event-header">
<h3 class="event-name"><a href="#event-complete">complete</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">progressbarcomplete</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the value of the progressbar reaches the maximum value of 100.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>complete</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).progressbar({
complete: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>complete</code> event by type: <code>progressbarcomplete</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "progressbarcomplete", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the progressbar functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the progressbar.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the progressbar.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any progressbar option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple progressbar options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-progressbar element.</p>
</div>
</li>
<li class="method" id="method-value">
<div class="method-header">
<h3 class="method-name"><a href="#method-value">value</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.progressbar( "value"
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>This method gets or sets the current value of the progressbar.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Progressbar plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.progressbar.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-progressbar </strong>ui-widget ui-widget-content ui-corner-all"><br />
<div style="width: 37%;" class="<strong>ui-progressbar-value</strong> ui-widget-header ui-corner-left"></div><br />
</div>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the progressbar plugin, not markup you should use to create a progressbar. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 21669 bytes
Post-expand include size: 26877 bytes
Template argument size: 10769 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3780-1!1!0!!en!2 and timestamp 20110801224126 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/progressbar.html | HTML | art | 12,247 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI removeClass</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/removeClass?section=1" title="Edit section: removeClass( [class], [duration] )">edit</a>]</div><a name="removeClass.28_.5Bclass.5D.2C_.5Bduration.5D_.29"></a><h3>removeClass( <span class="optional">[</span>class<span class="optional">]</span>, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
<p>Removes all or specified class from each of the set of matched elements with an optional transition between the states.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
Removes the class 'selected' from the matched elements with a one second transition.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">removeClass</strong>("selected", 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<style type="text/css">
p { cursor: pointer; font-size: 1.2em; }
.selected { color:red; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">removeClass</strong>("selected", 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p class="selected">Click me to remove 'selected' class.</p>
<p class="selected">Click me to remove 'selected' class.</p>
<p class="selected">Click me to remove 'selected' class.</p>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-class">
<div class="option-header">
<h3 class="option-name"><a href="#option-class">class</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>CSS classes to remove from the elements.</p>
</div>
</li>
<li class="option" id="option-duration">
<div class="option-header">
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 5297 bytes
Post-expand include size: 7164 bytes
Template argument size: 4498 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2607-1!1!0!!en!2 and timestamp 20110801225614 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/removeClass.html | HTML | art | 4,306 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Droppable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Droppable plugin makes selected elements droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.</p>
<p>All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p>
<ul>
<li> <b>ui.draggable</b> - current draggable element, a jQuery object.</li>
<li> <b>ui.helper</b> - current draggable helper, a jQuery object</li>
<li> <b>ui.position</b> - current position of the draggable helper { top: , left: }</li>
<li> <b>ui.offset</b> - current absolute position of the draggable helper { top: , left: }</li>
</ul>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
<li><a href="http://docs.jquery.com/UI/Draggable" title="UI/Draggable">UI Draggable</a></li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
Makes the div droppable (a drop target for a draggable).<br />
</p>
<pre>$("#draggable").draggable();
$("#droppable").droppable({
drop: function() { alert('dropped'); }
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#draggable { width: 75px; height: 25px; background: silver; padding: 10px; }
#droppable { position: absolute; left: 250px; top: 0; width: 125px; height: 75px; background: gray; color: white; padding: 10px; }
</style>
<script>
$(document).ready(function() {
$("#draggable").draggable();
$("#droppable").droppable({
drop: function() { alert('dropped'); }
});
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="droppable">Drop here</div>
<div id="draggable">Drag me</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the droppable. Can be set when initialising (first creating) the droppable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).droppable( "option", "disabled" );
//setter
$( ".selector" ).droppable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-accept">
<div class="option-header">
<h3 class="option-name"><a href="#option-accept">accept</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'*'</dd>
</dl>
</div>
<div class="option-description">
<p>All draggables that match the selector will be accepted. If a function is specified, the function will be called for each draggable on the page (passed as the first argument to the function), to provide a custom filter. The function should return true if the draggable should be accepted.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>accept</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ accept: '.special' });</code></pre>
</dd>
<dt>
Get or set the <code>accept</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var accept = $( ".selector" ).droppable( "option", "accept" );
//setter
$( ".selector" ).droppable( "option", "accept", '.special' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-activeClass">
<div class="option-header">
<h3 class="option-name"><a href="#option-activeClass">activeClass</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If specified, the class will be added to the droppable while an acceptable draggable is being dragged.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>activeClass</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ activeClass: 'ui-state-highlight' });</code></pre>
</dd>
<dt>
Get or set the <code>activeClass</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var activeClass = $( ".selector" ).droppable( "option", "activeClass" );
//setter
$( ".selector" ).droppable( "option", "activeClass", 'ui-state-highlight' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-addClasses">
<div class="option-header">
<h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to false, will prevent the ui-droppable class from being added. This may be desired as a performance optimization when calling .droppable() init on many hundreds of elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>addClasses</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ addClasses: false });</code></pre>
</dd>
<dt>
Get or set the <code>addClasses</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var addClasses = $( ".selector" ).droppable( "option", "addClasses" );
//setter
$( ".selector" ).droppable( "option", "addClasses", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-greedy">
<div class="option-header">
<h3 class="option-name"><a href="#option-greedy">greedy</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If true, will prevent event propagation on nested droppables.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>greedy</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ greedy: true });</code></pre>
</dd>
<dt>
Get or set the <code>greedy</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var greedy = $( ".selector" ).droppable( "option", "greedy" );
//setter
$( ".selector" ).droppable( "option", "greedy", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-hoverClass">
<div class="option-header">
<h3 class="option-name"><a href="#option-hoverClass">hoverClass</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If specified, the class will be added to the droppable while an acceptable draggable is being hovered.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>hoverClass</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ hoverClass: 'drophover' });</code></pre>
</dd>
<dt>
Get or set the <code>hoverClass</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var hoverClass = $( ".selector" ).droppable( "option", "hoverClass" );
//setter
$( ".selector" ).droppable( "option", "hoverClass", 'drophover' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scope">
<div class="option-header">
<h3 class="option-name"><a href="#option-scope">scope</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'default'</dd>
</dl>
</div>
<div class="option-description">
<p>Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>scope</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ scope: 'tasks' });</code></pre>
</dd>
<dt>
Get or set the <code>scope</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scope = $( ".selector" ).droppable( "option", "scope" );
//setter
$( ".selector" ).droppable( "option", "scope", 'tasks' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-tolerance">
<div class="option-header">
<h3 class="option-name"><a href="#option-tolerance">tolerance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'intersect'</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies which mode to use for testing whether a draggable is 'over' a droppable. Possible values: 'fit', 'intersect', 'pointer', 'touch'.
</p>
<ul>
<li><b>fit</b>: draggable overlaps the droppable entirely</li>
<li><b>intersect</b>: draggable overlaps the droppable at least 50%</li>
<li><b>pointer</b>: mouse pointer overlaps the droppable</li>
<li><b>touch</b>: draggable overlaps the droppable any amount</li>
</ul>
<p></p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a droppable with the <code>tolerance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({ tolerance: 'fit' });</code></pre>
</dd>
<dt>
Get or set the <code>tolerance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var tolerance = $( ".selector" ).droppable( "option", "tolerance" );
//setter
$( ".selector" ).droppable( "option", "tolerance", 'fit' );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dropcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when droppable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>dropcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dropcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-activate">
<div class="event-header">
<h3 class="event-name"><a href="#event-activate">activate</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dropactivate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered any time an accepted draggable starts dragging. This can be useful if you want to make the droppable 'light up' when it can be dropped on.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>activate</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
activate: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>activate</code> event by type: <code>dropactivate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dropactivate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-deactivate">
<div class="event-header">
<h3 class="event-name"><a href="#event-deactivate">deactivate</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dropdeactivate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered any time an accepted draggable stops dragging.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>deactivate</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
deactivate: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>deactivate</code> event by type: <code>dropdeactivate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dropdeactivate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-over">
<div class="event-header">
<h3 class="event-name"><a href="#event-over">over</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dropover</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered as an accepted draggable is dragged 'over' (within the tolerance of) this droppable.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>over</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
over: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>over</code> event by type: <code>dropover</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dropover", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-out">
<div class="event-header">
<h3 class="event-name"><a href="#event-out">out</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dropout</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when an accepted draggable is dragged out (within the tolerance of) this droppable.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>out</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
out: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>out</code> event by type: <code>dropout</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dropout", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-drop">
<div class="event-header">
<h3 class="event-name"><a href="#event-drop">drop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">drop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when an accepted draggable is dropped 'over' (within the tolerance of) this droppable. In the callback, $(this) represents the droppable the draggable is dropped on.
ui.draggable represents the draggable.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>drop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).droppable({
drop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>drop</code> event by type: <code>drop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "drop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the droppable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the droppable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the droppable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any droppable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple droppable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.droppable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-droppable element.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Droppable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.droppable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-droppable</strong>"></div>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the droppable plugin, not markup you should use to create a droppable. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 33687 bytes
Post-expand include size: 52676 bytes
Template argument size: 26565 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3769-1!1!0!!en!2 and timestamp 20110802001237 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/droppable.html | HTML | art | 22,546 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Tabs</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>Tabs are generally used to break content into multiple sections that can be swapped to save space, much like an accordion.</p>
<p>By default a tab widget will swap between tabbed sections onClick, but the events can be changed to onHover through an option. Tab content can be loaded via Ajax by setting an href on a tab.</p>
<p><em>NOTE: Tabs created dynamically using .tabs( "add", ... ) are given an id of ui-tabs-NUM, where NUM is an auto-incrementing id. If you use this naming convention for your own elements, you may encounter problems.</em></p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#Events"><span class="tocnumber">1</span> <span class="toctext">Events</span></a></li>
<li class="toclevel-1"><a href="#Ajax_mode"><span class="tocnumber">2</span> <span class="toctext">Ajax mode</span></a>
<ul>
<li class="toclevel-2"><a href="#Back_button_and_bookmarking"><span class="tocnumber">2.1</span> <span class="toctext">Back button and bookmarking</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#How_to..."><span class="tocnumber">3</span> <span class="toctext">How to...</span></a>
<ul>
<li class="toclevel-2"><a href="#...retrieve_the_index_of_the_currently_selected_tab"><span class="tocnumber">3.1</span> <span class="toctext">...retrieve the index of the currently selected tab</span></a></li>
<li class="toclevel-2"><a href="#...open_links_in_the_current_tab_instead_of_leaving_the_page"><span class="tocnumber">3.2</span> <span class="toctext">...open links in the current tab instead of leaving the page</span></a></li>
<li class="toclevel-2"><a href="#...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself"><span class="tocnumber">3.3</span> <span class="toctext">...select a tab from a text link instead of clicking a tab itself</span></a></li>
<li class="toclevel-2"><a href="#...prevent_switching_to_the_tab_on_click_depending_on_form_validation"><span class="tocnumber">3.4</span> <span class="toctext">...prevent switching to the tab on click depending on form validation</span></a></li>
<li class="toclevel-2"><a href="#...immediately_select_a_just_added_tab"><span class="tocnumber">3.5</span> <span class="toctext">...immediately select a just added tab</span></a></li>
<li class="toclevel-2"><a href="#...follow_a_tab.27s_URL_instead_of_loading_its_content_via_ajax"><span class="tocnumber">3.6</span> <span class="toctext">...follow a tab's URL instead of loading its content via ajax</span></a></li>
<li class="toclevel-2"><a href="#...prevent_a_FOUC_.28Flash_of_Unstyled_Content.29_before_tabs_are_initialized"><span class="tocnumber">3.7</span> <span class="toctext">...prevent a FOUC (Flash of Unstyled Content) before tabs are initialized</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Why_does..."><span class="tocnumber">4</span> <span class="toctext">Why does...</span></a>
<ul>
<li class="toclevel-2"><a href="#...my_slider.2C_Google_Map.2C_sIFR_etc._not_work_when_placed_in_a_hidden_.28inactive.29_tab.3F"><span class="tocnumber">4.1</span> <span class="toctext">...my slider, Google Map, sIFR etc. not work when placed in a hidden (inactive) tab?</span></a></li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=1" title="Template:UIAPIPlugin">edit</a>]</div><a name="Events"></a><h2>Events</h2>
<p>A series of events fire when interacting with a tabs interface:
</p>
<ul><li> tabsselect, tabsload, tabsshow (in that order)
</li><li> tabsadd, tabsremove
</li><li> tabsenable, tabsdisable
</li></ul>
<p>Event binding example:
</p>
<pre>$('#example').bind('tabsselect', function(event, ui) {
// Objects available in the function context:
ui.tab // anchor element of the selected (clicked) tab
ui.panel // element, that contains the selected/clicked tab contents
ui.index // zero-based index of the selected (clicked) tab
});</pre>
<p>Note that if a handler for the tabsselect event returns false, the clicked tab will not become selected (useful for example if switching to the next tab requires a form validation).
</p>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=2" title="Template:UIAPIPlugin">edit</a>]</div><a name="Ajax_mode"></a><h2> Ajax mode </h2>
<p>Tabs supports loading tab content via Ajax in an unobtrusive manner.
</p><p>The HTML you need is slightly different from the one that is used for static tabs: A list of links pointing to existing resources (from where the content gets loaded) and no additional containers at all (unobtrusive!). The containers' markup is going to be created on the fly:
</p>
<pre>
<div id="example">
<ul>
<li><a href="ahah_1.html"><span>Content 1</span></a></li>
<li><a href="ahah_2.html"><span>Content 2</span></a></li>
<li><a href="ahah_3.html"><span>Content 3</span></a></li>
</ul>
</div>
</pre>
<p>Obviously this degrades gracefully - the links, e.g. the content, will still be accessible with JavaScript disabled.
</p><p>Note that if you wish to reuse an existing container, you
could do so by matching a title attribute and the container's id:
</p>
<pre>
<li><a href="hello/world.html" title="Todo Overview"> ... </a></li>
</pre>
<p>and a container like:
</p>
<pre>
<div id="Todo_Overview"> ... </div>
</pre>
<p>(Note how white space is replaced with an underscore)
</p><p>This is useful if you want a human readable hash in the URL instead of
a cryptic generated one.
</p>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=3" title="Template:UIAPIPlugin">edit</a>]</div><a name="Back_button_and_bookmarking"></a><h3>Back button and bookmarking</h3>
<p>Tabs 2 already supported this functionality, although the history plugin needs a rewrite first (it doesn't support Safari 3 and is in general a little inflexible) before it can be build back into the tabs. It is planned and Klaus is working on it whenever he finds the time. Actual bugs in the UI Tabs plugin itself always have higher priority though.
</p>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=4" title="Template:UIAPIPlugin">edit</a>]</div><a name="How_to..."></a><h2>How to...</h2>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=5" title="Template:UIAPIPlugin">edit</a>]</div><a name="...retrieve_the_index_of_the_currently_selected_tab"></a><h3>...retrieve the index of the currently selected tab</h3>
<pre>var $tabs = $('#example').tabs();
var selected = $tabs.tabs('option', 'selected'); // => 0</pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=6" title="Template:UIAPIPlugin">edit</a>]</div><a name="...open_links_in_the_current_tab_instead_of_leaving_the_page"></a><h3>...open links in the current tab instead of leaving the page</h3>
<p>"Hijax" links after tab content has been loaded:
</p>
<pre>$('#example').tabs({
load: function(event, ui) {
$('a', ui.panel).click(function() {
$(ui.panel).load(this.href);
return false;
});
}
});</pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=7" title="Template:UIAPIPlugin">edit</a>]</div><a name="...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself"></a><h3>...select a tab from a text link instead of clicking a tab itself</h3>
<pre>var $tabs = $('#example').tabs(); // first tab selected
$('#my-text-link').click(function() { // bind click event to link
$tabs.tabs('select', 2); // switch to third tab
return false;
});</pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=8" title="Template:UIAPIPlugin">edit</a>]</div><a name="...prevent_switching_to_the_tab_on_click_depending_on_form_validation"></a><h3>...prevent switching to the tab on click depending on form validation</h3>
<p>Returning false in the tabs select handler prevents the clicked tab from becoming selected.
</p>
<pre>$('#example').tabs({
select: function(event, ui) {
var isValid = ... // form validation returning true or false
return isValid;
}
});</pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=9" title="Template:UIAPIPlugin">edit</a>]</div><a name="...immediately_select_a_just_added_tab"></a><h3>...immediately select a just added tab</h3>
<pre>var $tabs = $('#example').tabs({
add: function(event, ui) {
$tabs.tabs('select', '#' + ui.panel.id);
}
});</pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=10" title="Template:UIAPIPlugin">edit</a>]</div><a name="...follow_a_tab.27s_URL_instead_of_loading_its_content_via_ajax"></a><h3>...follow a tab's URL instead of loading its content via ajax</h3>
<p>Note that opening a tab in a new window is unexpected, e.g.
inconsistent behaviour exposing a usablity problem (<a href="http://www.useit.com/alertbox/tabs.html" class="external free" title="http://www.useit.com/alertbox/tabs.html">http://www.useit.com/alertbox/tabs.html</a>).
</p>
<pre>$('#example').tabs({
select: function(event, ui) {
var url = $.data(ui.tab, 'load.tabs');
if( url ) {
location.href = url;
return false;
}
return true;
}
});</pre>
<p><br />
</p>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=11" title="Template:UIAPIPlugin">edit</a>]</div><a name="...prevent_a_FOUC_.28Flash_of_Unstyled_Content.29_before_tabs_are_initialized"></a><h3>...prevent a FOUC (Flash of Unstyled Content) before tabs are initialized</h3>
<p>Add the necessary classes to hide an inactive tab panel to the HTML right away - note that this will <b>not</b> degrade gracefully with JavaScript being disabled:
</p>
<pre><div id="example" class="ui-tabs">
...
<div id="a-tab-panel" class="ui-tabs-hide"> </div>
...
</div></pre>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=12" title="Template:UIAPIPlugin">edit</a>]</div><a name="Why_does..."></a><h2>Why does...</h2>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/Template:UIAPIPlugin?section=13" title="Template:UIAPIPlugin">edit</a>]</div><a name="...my_slider.2C_Google_Map.2C_sIFR_etc._not_work_when_placed_in_a_hidden_.28inactive.29_tab.3F"></a><h3>...my slider, Google Map, sIFR etc. not work when placed in a hidden (inactive) tab?</h3>
<p>Any component that requires some dimensional computation for its initialization won't work in a hidden tab, because the tab panel itself is hidden via <code>display: none</code> so that any elements inside won't report their actual width and height (0 in most browsers).
</p><p>There's an easy workaround. Use the <em>off-left technique</em> for hiding inactive tab panels. E.g. in your style sheet replace the rule for the class selector ".ui-tabs .ui-tabs-hide" with
</p>
<pre>.ui-tabs .ui-tabs-hide {
position: absolute;
left: -10000px;
}</pre>
<p>For Google maps you can also resize the map once the tab is displayed like this:
</p>
<pre>$('#example').bind('tabsshow', function(event, ui) {
if (ui.panel.id == "map-tab") {
resizeMap();
}
});</pre>
resizeMap() will call Google Maps' checkResize() on the particular map.
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li><strong>Optional:</strong> <a href="http://plugins.jquery.com/project/cookie" class="external text" title="http://plugins.jquery.com/project/cookie">jquery.cookie.js</a> for use with <a href="http://jqueryui.com/demos/tabs/#option-cookie" class="external text" title="http://jqueryui.com/demos/tabs/#option-cookie">cookie option</a> (also included in development-bundle>external folder.)</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="295">
A simple jQuery UI Tabs.<br />
</p>
<pre>$("#tabs").tabs();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#tabs").tabs();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="tabs">
<ul>
<li><a href="#fragment-1"><span>One</span></a></li>
<li><a href="#fragment-2"><span>Two</span></a></li>
<li><a href="#fragment-3"><span>Three</span></a></li>
</ul>
<div id="fragment-1">
<p>First tab is active by default:</p>
<pre><code>$('#example').tabs();</code></pre>
</div>
<div id="fragment-2">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>
<div id="fragment-3">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>
</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the tabs. Can be set when initialising (first creating) the tabs.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).tabs( "option", "disabled" );
//setter
$( ".selector" ).tabs( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-ajaxOptions">
<div class="option-header">
<h3 class="option-name"><a href="#option-ajaxOptions">ajaxOptions</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Options</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Additional Ajax options to consider when loading tab content (see $.ajax).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>ajaxOptions</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ ajaxOptions: { async: false } });</code></pre>
</dd>
<dt>
Get or set the <code>ajaxOptions</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var ajaxOptions = $( ".selector" ).tabs( "option", "ajaxOptions" );
//setter
$( ".selector" ).tabs( "option", "ajaxOptions", { async: false } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cache">
<div class="option-header">
<h3 class="option-name"><a href="#option-cache">cache</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Whether or not to cache remote tabs content, e.g. load only once or with every click. Cached content is being lazy loaded, e.g once and only once for the first click. Note that to prevent the actual Ajax requests from being cached by the browser you need to provide an extra cache: false flag to ajaxOptions.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>cache</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ cache: true });</code></pre>
</dd>
<dt>
Get or set the <code>cache</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cache = $( ".selector" ).tabs( "option", "cache" );
//setter
$( ".selector" ).tabs( "option", "cache", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-collapsible">
<div class="option-header">
<h3 class="option-name"><a href="#option-collapsible">collapsible</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Set to true to allow an already selected tab to become unselected again upon reselection.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>collapsible</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ collapsible: true });</code></pre>
</dd>
<dt>
Get or set the <code>collapsible</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var collapsible = $( ".selector" ).tabs( "option", "collapsible" );
//setter
$( ".selector" ).tabs( "option", "collapsible", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cookie">
<div class="option-header">
<h3 class="option-name"><a href="#option-cookie">cookie</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Store the latest selected tab in a cookie. The cookie is then used to determine the initially selected tab if the <i>selected</i> option is not defined. Requires <a href="http://plugins.jquery.com/project/cookie" class="external text" title="http://plugins.jquery.com/project/cookie">cookie plugin</a>, which can also be found in the development-bundle>external folder from the download builder. The object needs to have key/value pairs of the form the cookie plugin expects as options. Available options (example): { expires: 7, path: '/', domain: 'jquery.com', secure: true }. Since jQuery UI 1.7 it is also possible to define the cookie name being used via <i>name</i> property.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>cookie</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ cookie: { expires: 30 } });</code></pre>
</dd>
<dt>
Get or set the <code>cookie</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cookie = $( ".selector" ).tabs( "option", "cookie" );
//setter
$( ".selector" ).tabs( "option", "cookie", { expires: 30 } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-deselectable">
<div class="option-header">
<h3 class="option-name"><a href="#option-deselectable">deselectable</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>deprecated in jQuery UI 1.7, use collapsible.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>deselectable</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ deselectable: true });</code></pre>
</dd>
<dt>
Get or set the <code>deselectable</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var deselectable = $( ".selector" ).tabs( "option", "deselectable" );
//setter
$( ".selector" ).tabs( "option", "deselectable", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array<Number></dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">[]</dd>
</dl>
</div>
<div class="option-description">
<p>An array containing the position of the tabs (zero-based index) that should be disabled on initialization.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ disabled: [1, 2] });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).tabs( "option", "disabled" );
//setter
$( ".selector" ).tabs( "option", "disabled", [1, 2] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-event">
<div class="option-header">
<h3 class="option-name"><a href="#option-event">event</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'click'</dd>
</dl>
</div>
<div class="option-description">
<p>The type of event to be used for selecting a tab.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>event</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ event: 'mouseover' });</code></pre>
</dd>
<dt>
Get or set the <code>event</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var event = $( ".selector" ).tabs( "option", "event" );
//setter
$( ".selector" ).tabs( "option", "event", 'mouseover' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-fx">
<div class="option-header">
<h3 class="option-name"><a href="#option-fx">fx</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Options, Array<Options></dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Enable animations for hiding and showing tab panels. The duration option can be a string representing one of the three predefined speeds ("slow", "normal", "fast") or the duration in milliseconds to run an animation (default is "normal").</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>fx</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ fx: { opacity: 'toggle' } });</code></pre>
</dd>
<dt>
Get or set the <code>fx</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var fx = $( ".selector" ).tabs( "option", "fx" );
//setter
$( ".selector" ).tabs( "option", "fx", { opacity: 'toggle' } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-idPrefix">
<div class="option-header">
<h3 class="option-name"><a href="#option-idPrefix">idPrefix</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'ui-tabs-'</dd>
</dl>
</div>
<div class="option-description">
<p>If the remote tab, its anchor element that is, has no title attribute to generate an id from, an id/fragment identifier is created from this prefix and a unique id returned by $.data(el), for example "ui-tabs-54".</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>idPrefix</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ idPrefix: 'ui-tabs-primary' });</code></pre>
</dd>
<dt>
Get or set the <code>idPrefix</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var idPrefix = $( ".selector" ).tabs( "option", "idPrefix" );
//setter
$( ".selector" ).tabs( "option", "idPrefix", 'ui-tabs-primary' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-panelTemplate">
<div class="option-header">
<h3 class="option-name"><a href="#option-panelTemplate">panelTemplate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'<div></div>'</dd>
</dl>
</div>
<div class="option-description">
<p>HTML template from which a new tab panel is created in case of adding a tab with the add method or when creating a panel for a remote tab on the fly.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>panelTemplate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ panelTemplate: '<li></li>' });</code></pre>
</dd>
<dt>
Get or set the <code>panelTemplate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var panelTemplate = $( ".selector" ).tabs( "option", "panelTemplate" );
//setter
$( ".selector" ).tabs( "option", "panelTemplate", '<li></li>' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-selected">
<div class="option-header">
<h3 class="option-name"><a href="#option-selected">selected</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Zero-based index of the tab to be selected on initialization. To set all tabs to unselected pass -1 as value.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>selected</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ selected: 3 });</code></pre>
</dd>
<dt>
Get or set the <code>selected</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var selected = $( ".selector" ).tabs( "option", "selected" );
//setter
$( ".selector" ).tabs( "option", "selected", 3 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-spinner">
<div class="option-header">
<h3 class="option-name"><a href="#option-spinner">spinner</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'<em>Loading&#8230;</em>'</dd>
</dl>
</div>
<div class="option-description">
<p>The HTML content of this string is shown in a tab title while remote content is loading. Pass in empty string to deactivate that behavior. An span element must be present in the A tag of the title, for the spinner content to be visible.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>spinner</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ spinner: 'Retrieving data...' });</code></pre>
</dd>
<dt>
Get or set the <code>spinner</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var spinner = $( ".selector" ).tabs( "option", "spinner" );
//setter
$( ".selector" ).tabs( "option", "spinner", 'Retrieving data...' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-tabTemplate">
<div class="option-header">
<h3 class="option-name"><a href="#option-tabTemplate">tabTemplate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'<li><a href="#{href}"><span>#{label}</span></a></li>'</dd>
</dl>
</div>
<div class="option-description">
<p>HTML template from which a new tab is created and added. The placeholders #{href} and #{label} are replaced with the url and tab label that are passed as arguments to the add method.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a tabs with the <code>tabTemplate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({ tabTemplate: '<div><a href="#{href}"><span>#{label}</span></a></div>' });</code></pre>
</dd>
<dt>
Get or set the <code>tabTemplate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var tabTemplate = $( ".selector" ).tabs( "option", "tabTemplate" );
//setter
$( ".selector" ).tabs( "option", "tabTemplate", '<div><a href="#{href}"><span>#{label}</span></a></div>' );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabscreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when tabs is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>tabscreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabscreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-select">
<div class="event-header">
<h3 class="event-name"><a href="#event-select">select</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsselect</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when clicking a tab.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>select</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
select: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>select</code> event by type: <code>tabsselect</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsselect", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-load">
<div class="event-header">
<h3 class="event-name"><a href="#event-load">load</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsload</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered after the content of a remote tab has been loaded.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>load</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
load: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>load</code> event by type: <code>tabsload</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsload", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-show">
<div class="event-header">
<h3 class="event-name"><a href="#event-show">show</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsshow</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a tab is shown.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>show</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
show: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>show</code> event by type: <code>tabsshow</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsshow", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-add">
<div class="event-header">
<h3 class="event-name"><a href="#event-add">add</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsadd</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a tab is added.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>add</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
add: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>add</code> event by type: <code>tabsadd</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsadd", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-remove">
<div class="event-header">
<h3 class="event-name"><a href="#event-remove">remove</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsremove</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a tab is removed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>remove</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
remove: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>remove</code> event by type: <code>tabsremove</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsremove", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-enable">
<div class="event-header">
<h3 class="event-name"><a href="#event-enable">enable</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsenable</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a tab is enabled.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>enable</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
enable: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>enable</code> event by type: <code>tabsenable</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsenable", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-disable">
<div class="event-header">
<h3 class="event-name"><a href="#event-disable">disable</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">tabsdisable</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a tab is disabled.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>disable</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).tabs({
disable: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>disable</code> event by type: <code>tabsdisable</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "tabsdisable", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the tabs functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the tabs.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the tabs.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any tabs option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple tabs options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-tabs element.</p>
</div>
</li>
<li class="method" id="method-add">
<div class="method-header">
<h3 class="method-name"><a href="#method-add">add</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "add"
, url
, label
, <span class="optional">[</span>index<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Add a new tab. The second argument is either a URL consisting of a fragment identifier only to create an in-page tab or a full url (relative or absolute, no cross-domain support) to turn the new tab into an Ajax (remote) tab. The third is the zero-based position where to insert the new tab. Optional, by default a new tab is appended at the end.</p>
</div>
</li>
<li class="method" id="method-remove">
<div class="method-header">
<h3 class="method-name"><a href="#method-remove">remove</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "remove"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove a tab. The second argument is the zero-based index of the tab to be removed.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "enable"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable a disabled tab. To enable more than one tab at once reset the disabled property like: <code>$('#example').tabs("option","disabled",[]);</code>. The second argument is the zero-based index of the tab to be enabled.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "disable"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable a tab. The selected tab cannot be disabled. To disable more than one tab at once use: <code>$('#example').tabs("option","disabled", [1, 2, 3]);</code> The second argument is the zero-based index of the tab to be disabled.</p>
</div>
</li>
<li class="method" id="method-select">
<div class="method-header">
<h3 class="method-name"><a href="#method-select">select</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "select"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Select a tab, as if it were clicked. The second argument is the zero-based index of the tab to be selected or the id selector of the panel the tab is associated with (the tab's href fragment identifier, e.g. hash, points to the panel's id).</p>
</div>
</li>
<li class="method" id="method-load">
<div class="method-header">
<h3 class="method-name"><a href="#method-load">load</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "load"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Reload the content of an Ajax tab programmatically. This method always loads the tab content from the remote location, even if cache is set to true. The second argument is the zero-based index of the tab to be reloaded.</p>
</div>
</li>
<li class="method" id="method-url">
<div class="method-header">
<h3 class="method-name"><a href="#method-url">url</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "url"
, index
, url
)</dd>
</dl>
</div>
<div class="method-description">
<p>Change the url from which an Ajax (remote) tab will be loaded. The specified URL will be used for subsequent loads. Note that you can not only change the URL for an existing remote tab with this method, but also turn an in-page tab into a remote tab. The second argument is the zero-based index of the tab of which its URL is to be updated. The third is a URL the content of the tab is loaded from.</p>
</div>
</li>
<li class="method" id="method-length">
<div class="method-header">
<h3 class="method-name"><a href="#method-length">length</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "length"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Retrieve the number of tabs of the first matched tab pane.</p>
</div>
</li>
<li class="method" id="method-abort">
<div class="method-header">
<h3 class="method-name"><a href="#method-abort">abort</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "abort"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Terminate all running tab ajax requests and animations.</p>
</div>
</li>
<li class="method" id="method-rotate">
<div class="method-header">
<h3 class="method-name"><a href="#method-rotate">rotate</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.tabs( "rotate"
, ms
, <span class="optional">[</span>continuing<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set up an automatic rotation through tabs of a tab pane. The second argument is an amount of time in milliseconds until the next tab in the cycle gets activated. Use 0 or null to stop the rotation. The third controls whether or not to continue the rotation after a tab has been selected by a user. Default: false.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Tabs plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.tabs.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-tabs</strong> ui-widget ui-widget-content ui-corner-all" id="tabs"><br />
<ul class="<strong>ui-tabs-nav</strong> ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"><br />
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Nunc tincidunt</a></li><br />
<li class="ui-state-default ui-corner-top"><a href="#tabs-2">Proin dolor</a></li><br />
<div class="<strong>ui-tabs-panel</strong> ui-widget-content ui-corner-bottom" id="tabs-1"><br />
<p>Tab one content goes here.</p><br />
</div><br />
...<br />
</div><br />
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the tabs plugin, not markup you should use to create a tabs. The only markup needed for that is <br /><div id="tabs"><br />
   <ul><br />
      <li><a href="#tabs-1">Nunc tincidunt</a></li><br />
      <li><a href="#tabs-2">Proin dolor</a></li><br />
      <li><a href="#tabs-3">Aenean lacinia</a></li><br />
   </ul><br />
   <div id="tabs-1"><br />
      <p>Tab 1 content</p><br />
   </div><br />
   <div id="tabs-2"><br />
      <p>Tab 2 content</p><br />
   </div><br />
   <div id="tabs-3"><br />
      <p>Tab 3 content</p><br />
   </div><br />
</div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 57666 bytes
Post-expand include size: 97459 bytes
Template argument size: 57562 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3777-1!1!0!!en!2 and timestamp 20110801231514 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/tabs.html | HTML | art | 51,800 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Datepicker</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.</p>
<p>By default, the datepicker calendar opens in a small overlay onFocus and closes automatically onBlur or when a date is selected. For an inline calendar, simply attach the datepicker to a div or span.
</p><p>You can use keyboard shortcuts to drive the datepicker:
</p>
<ul>
<li>page up/down - previous/next month</li>
<li>ctrl+page up/down - previous/next year</li>
<li>ctrl+home - current month or open when closed</li>
<li>ctrl+left/right - previous/next day</li>
<li>ctrl+up/down - previous/next week</li>
<li>enter - accept the selected date</li>
<li>ctrl+end - close and erase the date</li>
<li>escape - close the datepicker without selection</li>
</ul>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/API/1.8/Datepicker?section=1" title="Edit section: Utility functions">edit</a>]</div><a name="Utility_functions"></a><h3 id="utility-functions">Utility functions</h3>
<ul>
<li><a href="http://docs.jquery.com/UI/Datepicker/setDefaults" title="UI/Datepicker/setDefaults">$.datepicker.setDefaults( settings )</a> - Set settings for all datepicker instances.</li>
<li><a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="UI/Datepicker/formatDate">$.datepicker.formatDate( format, date, settings )</a> - Format a date into a string value with a specified format.</li>
<li><a href="http://docs.jquery.com/UI/Datepicker/parseDate" title="UI/Datepicker/parseDate">$.datepicker.parseDate( format, value, settings ) </a> - Extract a date from a string value with a specified format.</li>
<li><a href="http://docs.jquery.com/UI/Datepicker/iso8601Week" title="UI/Datepicker/iso8601Week">$.datepicker.iso8601Week( date )</a> - Determine the week of the year for a given date: 1 to 53.</li>
<li><a href="http://docs.jquery.com/UI/Datepicker/noWeekends" title="UI/Datepicker/noWeekends">$.datepicker.noWeekends</a> - Set as beforeShowDay function to prevent selection of weekends.</li>
</ul>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/API/1.8/Datepicker?section=2" title="Edit section: Localization">edit</a>]</div><a name="Localization"></a><h3>Localization</h3>
<p>Datepicker provides support for localizing its content to cater for different languages
and date formats. Each localization is contained within its own file with the
language code appended to the name, e.g. <code>jquery.ui.datepicker-fr.js</code> for French.
The desired localization file should be included after the main datepicker code. They add their settings to the set
of available localizations and automatically apply them as defaults for all instances.</p>
<p>The <code>$.datepicker.regional</code> attribute holds an array of localizations,
indexed by language code, with '' referring to the default (English). Each entry is
an object with the following attributes: <code>closeText</code>, <code>prevText</code>,
<code>nextText</code>, <code>currentText</code>, <code>monthNames</code>,
<code>monthNamesShort</code>, <code>dayNames</code>, <code>dayNamesShort</code>,
<code>dayNamesMin</code>, <code>weekHeader</code>, <code>dateFormat</code>,
<code>firstDay</code>, <code>isRTL</code>, <code>showMonthAfterYear</code>,
and <code>yearSuffix</code>.</p>
<p>You can restore the default localizations with:</p>
<p><code>$.datepicker.setDefaults($.datepicker.regional['']);</code>
</p>
<p>And can then override an individual datepicker for a specific locale:</p>
<p><code>$(selector).datepicker($.datepicker.regional['fr']);</code>
</p>
The localization files are also available in the UI svn: <a href="http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/" class="external free" title="http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/">http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/</a>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="220">
A simple jQuery UI Datepicker.<br />
</p>
<pre>$("#datepicker").datepicker();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#datepicker").datepicker();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="datepicker"></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the datepicker. Can be set when initialising (first creating) the datepicker.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).datepicker( "option", "disabled" );
//setter
$( ".selector" ).datepicker( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-altField">
<div class="option-header">
<h3 class="option-name"><a href="#option-altField">altField</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, jQuery, Element</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the <code><a href="http://docs.jquery.com/UI/Datepicker#option-altFormat" title="UI/Datepicker">altFormat</a></code> setting to change the format of the date within this field. Leave as blank for no alternate field.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>altField</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ altField: '#actualDate' });</code></pre>
</dd>
<dt>
Get or set the <code>altField</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var altField = $( ".selector" ).datepicker( "option", "altField" );
//setter
$( ".selector" ).datepicker( "option", "altField", '#actualDate' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-altFormat">
<div class="option-header">
<h3 class="option-name"><a href="#option-altFormat">altFormat</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>The <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> to be used for the <code><a href="http://docs.jquery.com/UI/Datepicker#option-altField" title="UI/Datepicker">altField</a></code> option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the <a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="UI/Datepicker/formatDate">formatDate</a> function</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>altFormat</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ altFormat: 'yy-mm-dd' });</code></pre>
</dd>
<dt>
Get or set the <code>altFormat</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var altFormat = $( ".selector" ).datepicker( "option", "altFormat" );
//setter
$( ".selector" ).datepicker( "option", "altFormat", 'yy-mm-dd' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-appendText">
<div class="option-header">
<h3 class="option-name"><a href="#option-appendText">appendText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display after each date field, e.g. to show the required format.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>appendText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ appendText: '(yyyy-mm-dd)' });</code></pre>
</dd>
<dt>
Get or set the <code>appendText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var appendText = $( ".selector" ).datepicker( "option", "appendText" );
//setter
$( ".selector" ).datepicker( "option", "appendText", '(yyyy-mm-dd)' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoSize">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoSize">autoSize</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Set to true to automatically resize the input field to accommodate dates in the current <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>autoSize</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ autoSize: true });</code></pre>
</dd>
<dt>
Get or set the <code>autoSize</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoSize = $( ".selector" ).datepicker( "option", "autoSize" );
//setter
$( ".selector" ).datepicker( "option", "autoSize", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-buttonImage">
<div class="option-header">
<h3 class="option-name"><a href="#option-buttonImage">buttonImage</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>The URL for the popup button image. If set, <code><a href="http://docs.jquery.com/UI/Datepicker#option-buttonText" title="UI/Datepicker">buttonText</a></code> becomes the <i>alt</i> value and is not directly displayed.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>buttonImage</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ buttonImage: '/images/datepicker.gif' });</code></pre>
</dd>
<dt>
Get or set the <code>buttonImage</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var buttonImage = $( ".selector" ).datepicker( "option", "buttonImage" );
//setter
$( ".selector" ).datepicker( "option", "buttonImage", '/images/datepicker.gif' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-buttonImageOnly">
<div class="option-header">
<h3 class="option-name"><a href="#option-buttonImageOnly">buttonImageOnly</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Set to true to place an image after the field to use as the trigger without it appearing on a button.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>buttonImageOnly</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ buttonImageOnly: true });</code></pre>
</dd>
<dt>
Get or set the <code>buttonImageOnly</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var buttonImageOnly = $( ".selector" ).datepicker( "option", "buttonImageOnly" );
//setter
$( ".selector" ).datepicker( "option", "buttonImageOnly", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-buttonText">
<div class="option-header">
<h3 class="option-name"><a href="#option-buttonText">buttonText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'...'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display on the trigger button. Use in conjunction with <code><a href="http://docs.jquery.com/UI/Datepicker#option-showOn" title="UI/Datepicker">showOn</a></code> equal to 'button' or 'both'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>buttonText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ buttonText: 'Choose' });</code></pre>
</dd>
<dt>
Get or set the <code>buttonText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var buttonText = $( ".selector" ).datepicker( "option", "buttonText" );
//setter
$( ".selector" ).datepicker( "option", "buttonText", 'Choose' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-calculateWeek">
<div class="option-header">
<h3 class="option-name"><a href="#option-calculateWeek">calculateWeek</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">$.datepicker.iso8601Week</dd>
</dl>
</div>
<div class="option-description">
<p>A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>calculateWeek</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ calculateWeek: myWeekCalc });</code></pre>
</dd>
<dt>
Get or set the <code>calculateWeek</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var calculateWeek = $( ".selector" ).datepicker( "option", "calculateWeek" );
//setter
$( ".selector" ).datepicker( "option", "calculateWeek", myWeekCalc );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-changeMonth">
<div class="option-header">
<h3 class="option-name"><a href="#option-changeMonth">changeMonth</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Allows you to change the month by selecting from a drop-down list. You can enable this feature by setting the attribute to true.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>changeMonth</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ changeMonth: true });</code></pre>
</dd>
<dt>
Get or set the <code>changeMonth</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var changeMonth = $( ".selector" ).datepicker( "option", "changeMonth" );
//setter
$( ".selector" ).datepicker( "option", "changeMonth", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-changeYear">
<div class="option-header">
<h3 class="option-name"><a href="#option-changeYear">changeYear</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Allows you to change the year by selecting from a drop-down list. You can enable this feature by setting the attribute to true. Use the <code><a href="http://docs.jquery.com/UI/Datepicker#option-yearRange" title="UI/Datepicker">yearRange</a></code> option to control which years are made available for selection.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>changeYear</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ changeYear: true });</code></pre>
</dd>
<dt>
Get or set the <code>changeYear</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var changeYear = $( ".selector" ).datepicker( "option", "changeYear" );
//setter
$( ".selector" ).datepicker( "option", "changeYear", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-closeText">
<div class="option-header">
<h3 class="option-name"><a href="#option-closeText">closeText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'Done'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display for the close link. This attribute is one of the regionalisation attributes. Use the <code><a href="http://docs.jquery.com/UI/Datepicker#option-showButtonPanel" title="UI/Datepicker">showButtonPanel</a></code> to display this button.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>closeText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ closeText: 'X' });</code></pre>
</dd>
<dt>
Get or set the <code>closeText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var closeText = $( ".selector" ).datepicker( "option", "closeText" );
//setter
$( ".selector" ).datepicker( "option", "closeText", 'X' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-constrainInput">
<div class="option-header">
<h3 class="option-name"><a href="#option-constrainInput">constrainInput</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>When true entry in the input field is constrained to those characters allowed by the current <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>constrainInput</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ constrainInput: false });</code></pre>
</dd>
<dt>
Get or set the <code>constrainInput</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var constrainInput = $( ".selector" ).datepicker( "option", "constrainInput" );
//setter
$( ".selector" ).datepicker( "option", "constrainInput", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-currentText">
<div class="option-header">
<h3 class="option-name"><a href="#option-currentText">currentText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'Today'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display for the current day link. This attribute is one of the regionalisation attributes. Use the <code><a href="http://docs.jquery.com/UI/Datepicker#option-showButtonPanel" title="UI/Datepicker">showButtonPanel</a></code> to display this button.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>currentText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ currentText: 'Now' });</code></pre>
</dd>
<dt>
Get or set the <code>currentText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var currentText = $( ".selector" ).datepicker( "option", "currentText" );
//setter
$( ".selector" ).datepicker( "option", "currentText", 'Now' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dateFormat">
<div class="option-header">
<h3 class="option-name"><a href="#option-dateFormat">dateFormat</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'mm/dd/yy'</dd>
</dl>
</div>
<div class="option-description">
<p>The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. For a full list of the possible formats see the <code><a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="UI/Datepicker/formatDate">formatDate</a></code> function.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>dateFormat</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ dateFormat: 'yy-mm-dd' });</code></pre>
</dd>
<dt>
Get or set the <code>dateFormat</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dateFormat = $( ".selector" ).datepicker( "option", "dateFormat" );
//setter
$( ".selector" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dayNames">
<div class="option-header">
<h3 class="option-name"><a href="#option-dayNames">dayNames</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']</dd>
</dl>
</div>
<div class="option-description">
<p>The list of long day names, starting from Sunday, for use as requested via the <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>dayNames</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] });</code></pre>
</dd>
<dt>
Get or set the <code>dayNames</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dayNames = $( ".selector" ).datepicker( "option", "dayNames" );
//setter
$( ".selector" ).datepicker( "option", "dayNames", ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dayNamesMin">
<div class="option-header">
<h3 class="option-name"><a href="#option-dayNamesMin">dayNamesMin</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']</dd>
</dl>
</div>
<div class="option-description">
<p>The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>dayNamesMin</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] });</code></pre>
</dd>
<dt>
Get or set the <code>dayNamesMin</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dayNamesMin = $( ".selector" ).datepicker( "option", "dayNamesMin" );
//setter
$( ".selector" ).datepicker( "option", "dayNamesMin", ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dayNamesShort">
<div class="option-header">
<h3 class="option-name"><a href="#option-dayNamesShort">dayNamesShort</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']</dd>
</dl>
</div>
<div class="option-description">
<p>The list of abbreviated day names, starting from Sunday, for use as requested via the <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> setting. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>dayNamesShort</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ dayNamesShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] });</code></pre>
</dd>
<dt>
Get or set the <code>dayNamesShort</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dayNamesShort = $( ".selector" ).datepicker( "option", "dayNamesShort" );
//setter
$( ".selector" ).datepicker( "option", "dayNamesShort", ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-defaultDate">
<div class="option-header">
<h3 class="option-name"><a href="#option-defaultDate">defaultDate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Date, Number, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object or as a string in the current <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code>, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>defaultDate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ defaultDate: +7 });</code></pre>
</dd>
<dt>
Get or set the <code>defaultDate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var defaultDate = $( ".selector" ).datepicker( "option", "defaultDate" );
//setter
$( ".selector" ).datepicker( "option", "defaultDate", +7 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-duration">
<div class="option-header">
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'normal'</dd>
</dl>
</div>
<div class="option-description">
<p>Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast").</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>duration</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ duration: 'slow' });</code></pre>
</dd>
<dt>
Get or set the <code>duration</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var duration = $( ".selector" ).datepicker( "option", "duration" );
//setter
$( ".selector" ).datepicker( "option", "duration", 'slow' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-firstDay">
<div class="option-header">
<h3 class="option-name"><a href="#option-firstDay">firstDay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>firstDay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ firstDay: 1 });</code></pre>
</dd>
<dt>
Get or set the <code>firstDay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var firstDay = $( ".selector" ).datepicker( "option", "firstDay" );
//setter
$( ".selector" ).datepicker( "option", "firstDay", 1 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-gotoCurrent">
<div class="option-header">
<h3 class="option-name"><a href="#option-gotoCurrent">gotoCurrent</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>When true the current day link moves to the currently selected date instead of today.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>gotoCurrent</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ gotoCurrent: true });</code></pre>
</dd>
<dt>
Get or set the <code>gotoCurrent</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var gotoCurrent = $( ".selector" ).datepicker( "option", "gotoCurrent" );
//setter
$( ".selector" ).datepicker( "option", "gotoCurrent", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-hideIfNoPrevNext">
<div class="option-header">
<h3 class="option-name"><a href="#option-hideIfNoPrevNext">hideIfNoPrevNext</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Normally the previous and next links are disabled when not applicable (see <code><a href="http://docs.jquery.com/UI/Datepicker#option-minDate" title="UI/Datepicker">minDate</a></code>/<code><a href="http://docs.jquery.com/UI/Datepicker#option-maxDate" title="UI/Datepicker">maxDate</a></code>). You can hide them altogether by setting this attribute to true.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>hideIfNoPrevNext</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ hideIfNoPrevNext: true });</code></pre>
</dd>
<dt>
Get or set the <code>hideIfNoPrevNext</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var hideIfNoPrevNext = $( ".selector" ).datepicker( "option", "hideIfNoPrevNext" );
//setter
$( ".selector" ).datepicker( "option", "hideIfNoPrevNext", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-isRTL">
<div class="option-header">
<h3 class="option-name"><a href="#option-isRTL">isRTL</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>isRTL</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ isRTL: true });</code></pre>
</dd>
<dt>
Get or set the <code>isRTL</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var isRTL = $( ".selector" ).datepicker( "option", "isRTL" );
//setter
$( ".selector" ).datepicker( "option", "isRTL", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-maxDate">
<div class="option-header">
<h3 class="option-name"><a href="#option-maxDate">maxDate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Date, Number, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Set a maximum selectable date via a Date object or as a string in the current <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code>, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>maxDate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ maxDate: '+1m +1w' });</code></pre>
</dd>
<dt>
Get or set the <code>maxDate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var maxDate = $( ".selector" ).datepicker( "option", "maxDate" );
//setter
$( ".selector" ).datepicker( "option", "maxDate", '+1m +1w' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minDate">
<div class="option-header">
<h3 class="option-name"><a href="#option-minDate">minDate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Date, Number, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>Set a minimum selectable date via a Date object or as a string in the current <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code>, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1y -1m'), or null for no limit.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>minDate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ minDate: new Date(2007, 1 - 1, 1) });</code></pre>
</dd>
<dt>
Get or set the <code>minDate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minDate = $( ".selector" ).datepicker( "option", "minDate" );
//setter
$( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-monthNames">
<div class="option-header">
<h3 class="option-name"><a href="#option-monthNames">monthNames</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']</dd>
</dl>
</div>
<div class="option-description">
<p>The list of full month names, for use as requested via the <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> setting. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>monthNames</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ monthNames: ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] });</code></pre>
</dd>
<dt>
Get or set the <code>monthNames</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var monthNames = $( ".selector" ).datepicker( "option", "monthNames" );
//setter
$( ".selector" ).datepicker( "option", "monthNames", ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-monthNamesShort">
<div class="option-header">
<h3 class="option-name"><a href="#option-monthNamesShort">monthNamesShort</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']</dd>
</dl>
</div>
<div class="option-description">
<p>The list of abbreviated month names, as used in the month header on each datepicker and as requested via the <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> setting. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>monthNamesShort</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });</code></pre>
</dd>
<dt>
Get or set the <code>monthNamesShort</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var monthNamesShort = $( ".selector" ).datepicker( "option", "monthNamesShort" );
//setter
$( ".selector" ).datepicker( "option", "monthNamesShort", ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-navigationAsDateFormat">
<div class="option-header">
<h3 class="option-name"><a href="#option-navigationAsDateFormat">navigationAsDateFormat</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>When true the <code><a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="UI/Datepicker/formatDate">formatDate</a></code> function is applied to the <code><a href="http://docs.jquery.com/UI/Datepicker#option-prevText" title="UI/Datepicker">prevText</a></code>, <code><a href="http://docs.jquery.com/UI/Datepicker#option-nextText" title="UI/Datepicker">nextText</a></code>, and <code><a href="http://docs.jquery.com/UI/Datepicker#option-currentText" title="UI/Datepicker">currentText</a></code> values before display, allowing them to display the target month names for example.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>navigationAsDateFormat</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ navigationAsDateFormat: true });</code></pre>
</dd>
<dt>
Get or set the <code>navigationAsDateFormat</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var navigationAsDateFormat = $( ".selector" ).datepicker( "option", "navigationAsDateFormat" );
//setter
$( ".selector" ).datepicker( "option", "navigationAsDateFormat", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-nextText">
<div class="option-header">
<h3 class="option-name"><a href="#option-nextText">nextText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'Next'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display for the next month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>nextText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ nextText: 'Later' });</code></pre>
</dd>
<dt>
Get or set the <code>nextText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var nextText = $( ".selector" ).datepicker( "option", "nextText" );
//setter
$( ".selector" ).datepicker( "option", "nextText", 'Later' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-numberOfMonths">
<div class="option-header">
<h3 class="option-name"><a href="#option-numberOfMonths">numberOfMonths</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number, Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Set how many months to show at once. The value can be a straight integer, or can be a two-element array to define the number of rows and columns to display.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>numberOfMonths</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ numberOfMonths: [2, 3] });</code></pre>
</dd>
<dt>
Get or set the <code>numberOfMonths</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var numberOfMonths = $( ".selector" ).datepicker( "option", "numberOfMonths" );
//setter
$( ".selector" ).datepicker( "option", "numberOfMonths", [2, 3] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-prevText">
<div class="option-header">
<h3 class="option-name"><a href="#option-prevText">prevText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'Prev'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display for the previous month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>prevText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ prevText: 'Earlier' });</code></pre>
</dd>
<dt>
Get or set the <code>prevText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var prevText = $( ".selector" ).datepicker( "option", "prevText" );
//setter
$( ".selector" ).datepicker( "option", "prevText", 'Earlier' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-selectOtherMonths">
<div class="option-header">
<h3 class="option-name"><a href="#option-selectOtherMonths">selectOtherMonths</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>When true days in other months shown before or after the current month are selectable. This only applies if <code><a href="http://docs.jquery.com/UI/Datepicker#option-showOtherMonths" title="UI/Datepicker">showOtherMonths</a></code> is also true.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>selectOtherMonths</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ selectOtherMonths: true });</code></pre>
</dd>
<dt>
Get or set the <code>selectOtherMonths</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var selectOtherMonths = $( ".selector" ).datepicker( "option", "selectOtherMonths" );
//setter
$( ".selector" ).datepicker( "option", "selectOtherMonths", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-shortYearCutoff">
<div class="option-header">
<h3 class="option-name"><a href="#option-shortYearCutoff">shortYearCutoff</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'+10'</dd>
</dl>
</div>
<div class="option-description">
<p>Set the cutoff year for determining the century for a date (used in conjunction with <code><a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">dateFormat</a></code> 'y'). If a numeric value (0-99) is provided then this value is used directly. If a string value is provided then it is converted to a number and added to the current year. Once the cutoff year is calculated, any dates entered with a year value less than or equal to it are considered to be in the current century, while those greater than it are deemed to be in the previous century.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>shortYearCutoff</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ shortYearCutoff: 50 });</code></pre>
</dd>
<dt>
Get or set the <code>shortYearCutoff</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var shortYearCutoff = $( ".selector" ).datepicker( "option", "shortYearCutoff" );
//setter
$( ".selector" ).datepicker( "option", "shortYearCutoff", 50 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showAnim">
<div class="option-header">
<h3 class="option-name"><a href="#option-showAnim">showAnim</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'show'</dd>
</dl>
</div>
<div class="option-description">
<p>Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', any of the show/hide <a href="http://docs.jquery.com/UI/Effects" class="external text" title="http://docs.jquery.com/UI/Effects">jQuery UI effects</a>, or '' for no animation.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showAnim</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showAnim: 'fold' });</code></pre>
</dd>
<dt>
Get or set the <code>showAnim</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showAnim = $( ".selector" ).datepicker( "option", "showAnim" );
//setter
$( ".selector" ).datepicker( "option", "showAnim", 'fold' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showButtonPanel">
<div class="option-header">
<h3 class="option-name"><a href="#option-showButtonPanel">showButtonPanel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Whether to show the button panel.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showButtonPanel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showButtonPanel: true });</code></pre>
</dd>
<dt>
Get or set the <code>showButtonPanel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showButtonPanel = $( ".selector" ).datepicker( "option", "showButtonPanel" );
//setter
$( ".selector" ).datepicker( "option", "showButtonPanel", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showCurrentAtPos">
<div class="option-header">
<h3 class="option-name"><a href="#option-showCurrentAtPos">showCurrentAtPos</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Specify where in a <a href="http://docs.jquery.com/UI/Datepicker#option-numberOfMonths" title="UI/Datepicker">multi-month</a> display the current month shows, starting from 0 at the top/left.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showCurrentAtPos</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showCurrentAtPos: 3 });</code></pre>
</dd>
<dt>
Get or set the <code>showCurrentAtPos</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showCurrentAtPos = $( ".selector" ).datepicker( "option", "showCurrentAtPos" );
//setter
$( ".selector" ).datepicker( "option", "showCurrentAtPos", 3 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showMonthAfterYear">
<div class="option-header">
<h3 class="option-name"><a href="#option-showMonthAfterYear">showMonthAfterYear</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Whether to show the month after the year in the header. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showMonthAfterYear</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showMonthAfterYear: true });</code></pre>
</dd>
<dt>
Get or set the <code>showMonthAfterYear</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showMonthAfterYear = $( ".selector" ).datepicker( "option", "showMonthAfterYear" );
//setter
$( ".selector" ).datepicker( "option", "showMonthAfterYear", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showOn">
<div class="option-header">
<h3 class="option-name"><a href="#option-showOn">showOn</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'focus'</dd>
</dl>
</div>
<div class="option-description">
<p>Have the datepicker appear automatically when the field receives focus ('focus'), appear only when a button is clicked ('button'), or appear when either event takes place ('both').</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showOn</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showOn: 'both' });</code></pre>
</dd>
<dt>
Get or set the <code>showOn</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showOn = $( ".selector" ).datepicker( "option", "showOn" );
//setter
$( ".selector" ).datepicker( "option", "showOn", 'both' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showOptions">
<div class="option-header">
<h3 class="option-name"><a href="#option-showOptions">showOptions</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Options</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">{}</dd>
</dl>
</div>
<div class="option-description">
<p>If using one of the jQuery UI effects for <code><a href="http://docs.jquery.com/UI/Datepicker#option-showAnim" title="UI/Datepicker">showAnim</a></code>, you can provide additional settings for that animation via this option.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showOptions</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showOptions: {direction: 'up' });</code></pre>
</dd>
<dt>
Get or set the <code>showOptions</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showOptions = $( ".selector" ).datepicker( "option", "showOptions" );
//setter
$( ".selector" ).datepicker( "option", "showOptions", {direction: 'up' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showOtherMonths">
<div class="option-header">
<h3 class="option-name"><a href="#option-showOtherMonths">showOtherMonths</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use <code><a href="http://docs.jquery.com/UI/Datepicker#option-selectOtherMonths" title="UI/Datepicker">selectOtherMonths</a></code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showOtherMonths</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showOtherMonths: true });</code></pre>
</dd>
<dt>
Get or set the <code>showOtherMonths</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showOtherMonths = $( ".selector" ).datepicker( "option", "showOtherMonths" );
//setter
$( ".selector" ).datepicker( "option", "showOtherMonths", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-showWeek">
<div class="option-header">
<h3 class="option-name"><a href="#option-showWeek">showWeek</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>When true a column is added to show the week of the year. The <code><a href="http://docs.jquery.com/UI/Datepicker#option-calculateWeek" title="UI/Datepicker">calculateWeek</a></code> option determines how the week of the year is calculated. You may also want to change the <code><a href="http://docs.jquery.com/UI/Datepicker#option-firstDay" title="UI/Datepicker">firstDay</a></code> option.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>showWeek</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ showWeek: true });</code></pre>
</dd>
<dt>
Get or set the <code>showWeek</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var showWeek = $( ".selector" ).datepicker( "option", "showWeek" );
//setter
$( ".selector" ).datepicker( "option", "showWeek", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-stepMonths">
<div class="option-header">
<h3 class="option-name"><a href="#option-stepMonths">stepMonths</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Set how many months to move when clicking the Previous/Next links.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>stepMonths</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ stepMonths: 3 });</code></pre>
</dd>
<dt>
Get or set the <code>stepMonths</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var stepMonths = $( ".selector" ).datepicker( "option", "stepMonths" );
//setter
$( ".selector" ).datepicker( "option", "stepMonths", 3 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-weekHeader">
<div class="option-header">
<h3 class="option-name"><a href="#option-weekHeader">weekHeader</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'Wk'</dd>
</dl>
</div>
<div class="option-description">
<p>The text to display for the week of the year column heading. This attribute is one of the regionalisation attributes. Use <code><a href="http://docs.jquery.com/UI/Datepicker#option-showWeek" title="UI/Datepicker">showWeek</a></code> to display this column.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>weekHeader</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ weekHeader: 'W' });</code></pre>
</dd>
<dt>
Get or set the <code>weekHeader</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var weekHeader = $( ".selector" ).datepicker( "option", "weekHeader" );
//setter
$( ".selector" ).datepicker( "option", "weekHeader", 'W' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-yearRange">
<div class="option-header">
<h3 class="option-name"><a href="#option-yearRange">yearRange</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'c-10:c+10'</dd>
</dl>
</div>
<div class="option-description">
<p>Control the range of years displayed in the year drop-down: either relative to today's year (-nn:+nn), relative to the currently selected year (c-nn:c+nn), absolute (nnnn:nnnn), or combinations of these formats (nnnn:-nn). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the <code><a href="http://docs.jquery.com/UI/Datepicker#option-minDate" title="UI/Datepicker">minDate</a></code> and/or <code><a href="http://docs.jquery.com/UI/Datepicker#option-maxDate" title="UI/Datepicker">maxDate</a></code> options.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>yearRange</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ yearRange: '2000:2010' });</code></pre>
</dd>
<dt>
Get or set the <code>yearRange</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var yearRange = $( ".selector" ).datepicker( "option", "yearRange" );
//setter
$( ".selector" ).datepicker( "option", "yearRange", '2000:2010' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-yearSuffix">
<div class="option-header">
<h3 class="option-name"><a href="#option-yearSuffix">yearSuffix</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>Additional text to display after the year in the month headers. This attribute is one of the regionalisation attributes.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a datepicker with the <code>yearSuffix</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({ yearSuffix: 'CE' });</code></pre>
</dd>
<dt>
Get or set the <code>yearSuffix</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var yearSuffix = $( ".selector" ).datepicker( "option", "yearSuffix" );
//setter
$( ".selector" ).datepicker( "option", "yearSuffix", 'CE' );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">datepickercreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when datepicker is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).datepicker({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>datepickercreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "datepickercreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-beforeShow">
<div class="event-header">
<h3 class="event-name"><a href="#event-beforeShow">beforeShow</a></h3>
<dl>
<dt class="event-type-label"></dt>
<dd class="event-type">function(input, inst)</dd>
</dl>
</div>
<div class="event-description">
<p>Can be a function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>beforeShow</code> event as an init option.
</dt>
<dd>
<pre><code>$('.selector').datepicker({
beforeShow: function(input, inst) { ... }
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-beforeShowDay">
<div class="event-header">
<h3 class="event-name"><a href="#event-beforeShowDay">beforeShowDay</a></h3>
<dl>
<dt class="event-type-label"></dt>
<dd class="event-type">function(date)</dd>
</dl>
</div>
<div class="event-description">
<p>The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable, [1] equal to a CSS class name(s) or '' for the default presentation, and [2] an optional popup tooltip for this date. It is called for each day in the datepicker before it is displayed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>beforeShowDay</code> event as an init option.
</dt>
<dd>
<pre><code>$('.selector').datepicker({
beforeShowDay: function(date) { ... }
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-onChangeMonthYear">
<div class="event-header">
<h3 class="event-name"><a href="#event-onChangeMonthYear">onChangeMonthYear</a></h3>
<dl>
<dt class="event-type-label"></dt>
<dd class="event-type">function(year, month, inst)</dd>
</dl>
</div>
<div class="event-description">
<p>Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. <code>this</code> refers to the associated input field.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>onChangeMonthYear</code> event as an init option.
</dt>
<dd>
<pre><code>$('.selector').datepicker({
onChangeMonthYear: function(year, month, inst) { ... }
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-onClose">
<div class="event-header">
<h3 class="event-name"><a href="#event-onClose">onClose</a></h3>
<dl>
<dt class="event-type-label"></dt>
<dd class="event-type">function(dateText, inst)</dd>
</dl>
</div>
<div class="event-description">
<p>Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text ('' if none) and the datepicker instance as parameters. <code>this</code> refers to the associated input field.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>onClose</code> event as an init option.
</dt>
<dd>
<pre><code>$('.selector').datepicker({
onClose: function(dateText, inst) { ... }
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-onSelect">
<div class="event-header">
<h3 class="event-name"><a href="#event-onSelect">onSelect</a></h3>
<dl>
<dt class="event-type-label"></dt>
<dd class="event-type">function(dateText, inst)</dd>
</dl>
</div>
<div class="event-description">
<p>Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. <code>this</code> refers to the associated input field.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>onSelect</code> event as an init option.
</dt>
<dd>
<pre><code>$('.selector').datepicker({
onSelect: function(dateText, inst) { ... }
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the datepicker functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the datepicker.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the datepicker.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any datepicker option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple datepicker options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-datepicker element.</p>
</div>
</li>
<li class="method" id="method-dialog">
<div class="method-header">
<h3 class="method-name"><a href="#method-dialog">dialog</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "dialog"
, date
, <span class="optional">[</span>onSelect<span class="optional">] </span>
, <span class="optional">[</span>settings<span class="optional">] </span>
, <span class="optional">[</span>pos<span class="optional">] </span>)</dd>
</dl>
</div>
<div class="method-description">
<p>Open a datepicker in a "dialog" box.
</p><p>dateText: the initial date for the date picker as either a Date or a string in the current date format.
</p><p>onSelect: A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
</p><p>settings: The new settings for the date picker.
</p><p>pos: The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.</p>
</div>
</li>
<li class="method" id="method-isDisabled">
<div class="method-header">
<h3 class="method-name"><a href="#method-isDisabled">isDisabled</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "isDisabled"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Determine whether a date picker has been disabled.</p>
</div>
</li>
<li class="method" id="method-hide">
<div class="method-header">
<h3 class="method-name"><a href="#method-hide">hide</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "hide"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Close a previously opened date picker.</p>
</div>
</li>
<li class="method" id="method-show">
<div class="method-header">
<h3 class="method-name"><a href="#method-show">show</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "show"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Call up a previously attached date picker.</p>
</div>
</li>
<li class="method" id="method-refresh">
<div class="method-header">
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "refresh"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Redraw a date picker, after having made some external modifications.</p>
</div>
</li>
<li class="method" id="method-getDate">
<div class="method-header">
<h3 class="method-name"><a href="#method-getDate">getDate</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "getDate"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the current date for the datepicker or null if no date has been selected.</p>
</div>
</li>
<li class="method" id="method-setDate">
<div class="method-header">
<h3 class="method-name"><a href="#method-setDate">setDate</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.datepicker( "setDate"
, date
)</dd>
</dl>
</div>
<div class="method-description">
<p>Sets the current date for the datepicker. The new date may be a Date object or a string in the current <a href="http://docs.jquery.com/UI/Datepicker#option-dateFormat" title="UI/Datepicker">date format</a> (e.g. '01/26/2009'), a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null to clear the selected date.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Datepicker plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.datepicker.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div id="ui-datepicker-div" class="<strong>ui-datepicker</strong> ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"><br />
<div class="<strong>ui-datepicker-header</strong> ui-widget-header ui-helper-clearfix ui-corner-all"><br />
<a class="<strong>ui-datepicker-prev</strong> ui-corner-all">title="Prev"><span class="ui-icon ui-icon-circle-triangle-w">Prev</span></a><br />
<a class="<strong>ui-datepicker-next</strong> ui-corner-all" title="Next"><span class="ui-icon ui-icon-circle-triangle-e">Next</span></a><br />
<div class="<strong>ui-datepicker-title</strong>"><br />
<span class="<strong>ui-datepicker-month</strong>">January</span><span class="<strong>ui-datepicker-year</strong>">2009</span><br />
</div><br />
</div><br />
<table class="<strong>ui-datepicker-calendar</strong>"><br />
<thead><br />
<tr><br />
<th class="<strong>ui-datepicker-week-end</strong>"><span title="Sunday">Su</span></th><br />
...<br />
</tr><br />
</thead><br />
<tbody><tr><br />
<td class="<strong>ui-datepicker-week-end ui-datepicker-other-month</strong> "> 1 </td><br />
...<br />
</tr><br />
</tbody><br />
</table><br />
<div class="<strong>ui-datepicker-buttonpane</strong> ui-widget-content"><br />
<button type="button" class="<strong>ui-datepicker-current</strong> ui-state-default ui-priority-secondary ui-corner-all">Today</button><br />
<button type="button" class="<strong>ui-datepicker-close</strong> ui-state-default ui-priority-primary ui-corner-all">Done</button><br />
</div><br />
</div><br />
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the datepicker plugin, not markup you should use to create a datepicker. The only markup needed for that is <input type="text" /> or <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 98753 bytes
Post-expand include size: 196024 bytes
Template argument size: 121358 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3774-1!1!0!!en!2 and timestamp 20110801231602 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/datepicker.html | HTML | art | 81,617 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Resizable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Resizable plugin makes selected elements resizable (meaning they have draggable resize handles). You can specify one or more handles as well as min and max width and height.</p>
<p>All callbacks (start,stop,resize) receive two arguments: The original browser event and a prepared ui object. The ui object has the following fields:</p>
<ul>
<li><b>ui.helper</b> - a jQuery object containing the helper element</li>
<li><b>ui.originalPosition</b> - {top, left} before resizing started</li>
<li><b>ui.originalSize</b> - {width, height} before resizing started</li>
<li><b>ui.position</b> - {top, left} current position</li>
<li><b>ui.size</b> - {width, height} current size</li>
</ul>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="250">
A simple jQuery UI Resizable.<br />
</p>
<pre>$("#resizable").resizable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#resizable { width: 100px; height: 100px; background: silver; }
</style>
<script>
$(document).ready(function() {
$("#resizable").resizable();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="resizable"></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the resizable. Can be set when initialising (first creating) the resizable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).resizable( "option", "disabled" );
//setter
$( ".selector" ).resizable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-alsoResize">
<div class="option-header">
<h3 class="option-name"><a href="#option-alsoResize">alsoResize</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, jQuery, Element</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Resize these elements synchronous when resizing.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>alsoResize</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ alsoResize: '.other' });</code></pre>
</dd>
<dt>
Get or set the <code>alsoResize</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var alsoResize = $( ".selector" ).resizable( "option", "alsoResize" );
//setter
$( ".selector" ).resizable( "option", "alsoResize", '.other' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-animate">
<div class="option-header">
<h3 class="option-name"><a href="#option-animate">animate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Animates to the final size after resizing.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>animate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ animate: true });</code></pre>
</dd>
<dt>
Get or set the <code>animate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var animate = $( ".selector" ).resizable( "option", "animate" );
//setter
$( ".selector" ).resizable( "option", "animate", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-animateDuration">
<div class="option-header">
<h3 class="option-name"><a href="#option-animateDuration">animateDuration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'slow'</dd>
</dl>
</div>
<div class="option-description">
<p>Duration time for animating, in milliseconds. Other possible values: 'slow', 'normal', 'fast'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>animateDuration</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ animateDuration: 500 });</code></pre>
</dd>
<dt>
Get or set the <code>animateDuration</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var animateDuration = $( ".selector" ).resizable( "option", "animateDuration" );
//setter
$( ".selector" ).resizable( "option", "animateDuration", 500 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-animateEasing">
<div class="option-header">
<h3 class="option-name"><a href="#option-animateEasing">animateEasing</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'swing'</dd>
</dl>
</div>
<div class="option-description">
<p>Easing effect for animating.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>animateEasing</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ animateEasing: 'swing' });</code></pre>
</dd>
<dt>
Get or set the <code>animateEasing</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var animateEasing = $( ".selector" ).resizable( "option", "animateEasing" );
//setter
$( ".selector" ).resizable( "option", "animateEasing", 'swing' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-aspectRatio">
<div class="option-header">
<h3 class="option-name"><a href="#option-aspectRatio">aspectRatio</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, Float</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, resizing is constrained by the original aspect ratio. Otherwise a custom aspect ratio can be specified, such as 9 / 16, or 0.5.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>aspectRatio</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ aspectRatio: .75 });</code></pre>
</dd>
<dt>
Get or set the <code>aspectRatio</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var aspectRatio = $( ".selector" ).resizable( "option", "aspectRatio" );
//setter
$( ".selector" ).resizable( "option", "aspectRatio", .75 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoHide">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoHide">autoHide</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, automatically hides the handles except when the mouse hovers over the element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>autoHide</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ autoHide: true });</code></pre>
</dd>
<dt>
Get or set the <code>autoHide</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoHide = $( ".selector" ).resizable( "option", "autoHide" );
//setter
$( ".selector" ).resizable( "option", "autoHide", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cancel">
<div class="option-header">
<h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">':input,option'</dd>
</dl>
</div>
<div class="option-description">
<p>Prevents resizing if you start on elements matching the selector.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>cancel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ cancel: ':input,option' });</code></pre>
</dd>
<dt>
Get or set the <code>cancel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cancel = $( ".selector" ).resizable( "option", "cancel" );
//setter
$( ".selector" ).resizable( "option", "cancel", ':input,option' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-containment">
<div class="option-header">
<h3 class="option-name"><a href="#option-containment">containment</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Element, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains resizing to within the bounds of the specified element. Possible values: 'parent', 'document', a DOMElement, or a Selector.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>containment</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ containment: 'parent' });</code></pre>
</dd>
<dt>
Get or set the <code>containment</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var containment = $( ".selector" ).resizable( "option", "containment" );
//setter
$( ".selector" ).resizable( "option", "containment", 'parent' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Tolerance, in milliseconds, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond duration. This can help prevent unintended resizing when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ delay: 20 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).resizable( "option", "delay" );
//setter
$( ".selector" ).resizable( "option", "delay", 20 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-distance">
<div class="option-header">
<h3 class="option-name"><a href="#option-distance">distance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Tolerance, in pixels, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond distance. This can help prevent unintended resizing when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>distance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ distance: 20 });</code></pre>
</dd>
<dt>
Get or set the <code>distance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var distance = $( ".selector" ).resizable( "option", "distance" );
//setter
$( ".selector" ).resizable( "option", "distance", 20 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-ghost">
<div class="option-header">
<h3 class="option-name"><a href="#option-ghost">ghost</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, a semi-transparent helper element is shown for resizing.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>ghost</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ ghost: true });</code></pre>
</dd>
<dt>
Get or set the <code>ghost</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var ghost = $( ".selector" ).resizable( "option", "ghost" );
//setter
$( ".selector" ).resizable( "option", "ghost", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-grid">
<div class="option-header">
<h3 class="option-name"><a href="#option-grid">grid</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Snaps the resizing element to a grid, every x and y pixels. Array values: [x, y]</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>grid</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ grid: [50, 50] });</code></pre>
</dd>
<dt>
Get or set the <code>grid</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var grid = $( ".selector" ).resizable( "option", "grid" );
//setter
$( ".selector" ).resizable( "option", "grid", [50, 50] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-handles">
<div class="option-header">
<h3 class="option-name"><a href="#option-handles">handles</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'e, s, se'</dd>
</dl>
</div>
<div class="option-description">
<p>If specified as a string, should be a comma-split list of any of the following: 'n, e, s, w, ne, se, sw, nw, all'. The necessary handles will be auto-generated by the plugin.
</p><p>If specified as an object, the following keys are supported: { n, e, s, w, ne, se, sw, nw }. The value of any specified should be a jQuery selector matching the child element of the resizable to use as that handle. If the handle is not a child of the resizable, you can pass in the DOMElement or a valid jQuery object directly.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>handles</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ handles: 'n, e, s, w' });</code></pre>
</dd>
<dt>
Get or set the <code>handles</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var handles = $( ".selector" ).resizable( "option", "handles" );
//setter
$( ".selector" ).resizable( "option", "handles", 'n, e, s, w' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-helper">
<div class="option-header">
<h3 class="option-name"><a href="#option-helper">helper</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>This is the css class that will be added to a proxy element to outline the resize during the drag of the resize handle. Once the resize is complete, the original element is sized.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>helper</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ helper: 'ui-state-highlight' });</code></pre>
</dd>
<dt>
Get or set the <code>helper</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var helper = $( ".selector" ).resizable( "option", "helper" );
//setter
$( ".selector" ).resizable( "option", "helper", 'ui-state-highlight' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-maxHeight">
<div class="option-header">
<h3 class="option-name"><a href="#option-maxHeight">maxHeight</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>This is the maximum height the resizable should be allowed to resize to.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>maxHeight</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ maxHeight: 300 });</code></pre>
</dd>
<dt>
Get or set the <code>maxHeight</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var maxHeight = $( ".selector" ).resizable( "option", "maxHeight" );
//setter
$( ".selector" ).resizable( "option", "maxHeight", 300 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-maxWidth">
<div class="option-header">
<h3 class="option-name"><a href="#option-maxWidth">maxWidth</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>This is the maximum width the resizable should be allowed to resize to.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>maxWidth</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ maxWidth: 250 });</code></pre>
</dd>
<dt>
Get or set the <code>maxWidth</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var maxWidth = $( ".selector" ).resizable( "option", "maxWidth" );
//setter
$( ".selector" ).resizable( "option", "maxWidth", 250 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minHeight">
<div class="option-header">
<h3 class="option-name"><a href="#option-minHeight">minHeight</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">10</dd>
</dl>
</div>
<div class="option-description">
<p>This is the minimum height the resizable should be allowed to resize to.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>minHeight</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ minHeight: 150 });</code></pre>
</dd>
<dt>
Get or set the <code>minHeight</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minHeight = $( ".selector" ).resizable( "option", "minHeight" );
//setter
$( ".selector" ).resizable( "option", "minHeight", 150 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minWidth">
<div class="option-header">
<h3 class="option-name"><a href="#option-minWidth">minWidth</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">10</dd>
</dl>
</div>
<div class="option-description">
<p>This is the minimum width the resizable should be allowed to resize to.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a resizable with the <code>minWidth</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({ minWidth: 75 });</code></pre>
</dd>
<dt>
Get or set the <code>minWidth</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minWidth = $( ".selector" ).resizable( "option", "minWidth" );
//setter
$( ".selector" ).resizable( "option", "minWidth", 75 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">resizecreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when resizable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>resizecreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "resizecreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">resizestart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the start of a resize operation.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>resizestart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "resizestart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-resize">
<div class="event-header">
<h3 class="event-name"><a href="#event-resize">resize</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">resize</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered during the resize, on the drag of the resize handler.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>resize</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({
resize: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>resize</code> event by type: <code>resize</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "resize", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">resizestop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the end of a resize operation.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).resizable({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>resizestop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "resizestop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the resizable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the resizable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the resizable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any resizable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple resizable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.resizable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-resizable element.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Resizable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.resizable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-resizable</strong>"><br />
   <div style="-moz-user-select: none;" unselectable="on" class="<strong>ui-resizable-handle ui-resizable-e</strong>"></div><br />
   <div style="-moz-user-select: none;" unselectable="on" class="<strong>ui-resizable-handle ui-resizable-s</strong>"></div><br />
   <div unselectable="on" style="z-index: 1001; -moz-user-select: none;" class="<strong>ui-resizable-handle ui-resizable-se</strong> ui-icon ui-icon-gripsmall-diagonal-se"></div><br />
</div>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the resizable plugin, not markup you should use to create a resizable. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 47687 bytes
Post-expand include size: 80197 bytes
Template argument size: 42354 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3770-1!1!0!!en!2 and timestamp 20110801231352 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/resizable.html | HTML | art | 32,192 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Dialog</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the 'x' icon by default.</p>
<p>If the content length exceeds the maximum height, a scrollbar will automatically appear.</p>
<p>A bottom button bar and semi-transparent modal overlay layer are common options that can be added.</p>
<p>A call to <code>$(foo).dialog()</code> will initialize a dialog instance and will auto-open the dialog by default. If you want to reuse a dialog, the easiest way is to disable the "auto-open" option with: <code>$(foo).dialog({ autoOpen: false })</code> and open it with <code>$(foo).dialog('open')</code>. To close it, use <code>$(foo).dialog('close')</code>. A more in-depth explanation with a full demo is available on <a href="http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/" class="external text" title="http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/">the Nemikor blog</a>.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Position</li>
<li>UI Widget</li>
<li>UI Mouse (Optional; only needed if using UI Draggable or UI Resizable)</li>
<li>UI Draggable (Optional)</li>
<li>UI Resizable (Optional)</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="300">
A simple jQuery UI Dialog.<br />
</p>
<pre>$("#dialog").dialog();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#dialog").dialog();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="dialog" title="Dialog Title">I'm in a dialog</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the dialog. Can be set when initialising (first creating) the dialog.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).dialog( "option", "disabled" );
//setter
$( ".selector" ).dialog( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoOpen">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoOpen">autoOpen</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>When <i>autoOpen</i> is <i>true</i> the dialog will open automatically when <i>dialog</i> is called. If <i>false</i> it will stay hidden until <i>.dialog("open")</i> is called on it.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>autoOpen</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ autoOpen: false });</code></pre>
</dd>
<dt>
Get or set the <code>autoOpen</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoOpen = $( ".selector" ).dialog( "option", "autoOpen" );
//setter
$( ".selector" ).dialog( "option", "autoOpen", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-buttons">
<div class="option-header">
<h3 class="option-name"><a href="#option-buttons">buttons</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">{ }</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked. The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object.
</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>buttons</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ buttons: { "Ok": function() { $(this).dialog("close"); } } });</code></pre>
</dd>
<dt>
Get or set the <code>buttons</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var buttons = $( ".selector" ).dialog( "option", "buttons" );
//setter
$( ".selector" ).dialog( "option", "buttons", { "Ok": function() { $(this).dialog("close"); } } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-buttons">
<div class="option-header">
<h3 class="option-name"><a href="#option-buttons">buttons</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">[ ]</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies which buttons should be displayed on the dialog. Each element of the array must be an Object defining the properties to set on the button.
</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>buttons</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ buttons: [
{
text: "Ok",
click: function() { $(this).dialog("close"); }
}
] });</code></pre>
</dd>
<dt>
Get or set the <code>buttons</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var buttons = $( ".selector" ).dialog( "option", "buttons" );
//setter
$( ".selector" ).dialog( "option", "buttons", [
{
text: "Ok",
click: function() { $(this).dialog("close"); }
}
] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-closeOnEscape">
<div class="option-header">
<h3 class="option-name"><a href="#option-closeOnEscape">closeOnEscape</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies whether the dialog should close when it has focus and the user presses the esacpe (ESC) key.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>closeOnEscape</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ closeOnEscape: false });</code></pre>
</dd>
<dt>
Get or set the <code>closeOnEscape</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var closeOnEscape = $( ".selector" ).dialog( "option", "closeOnEscape" );
//setter
$( ".selector" ).dialog( "option", "closeOnEscape", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-closeText">
<div class="option-header">
<h3 class="option-name"><a href="#option-closeText">closeText</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'close'</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies the text for the close button. Note that the close text is visibly hidden when using a standard theme.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>closeText</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ closeText: 'hide' });</code></pre>
</dd>
<dt>
Get or set the <code>closeText</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var closeText = $( ".selector" ).dialog( "option", "closeText" );
//setter
$( ".selector" ).dialog( "option", "closeText", 'hide' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dialogClass">
<div class="option-header">
<h3 class="option-name"><a href="#option-dialogClass">dialogClass</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>The specified class name(s) will be added to the dialog, for additional theming.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>dialogClass</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ dialogClass: 'alert' });</code></pre>
</dd>
<dt>
Get or set the <code>dialogClass</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dialogClass = $( ".selector" ).dialog( "option", "dialogClass" );
//setter
$( ".selector" ).dialog( "option", "dialogClass", 'alert' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-draggable">
<div class="option-header">
<h3 class="option-name"><a href="#option-draggable">draggable</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the dialog will be draggable will be draggable by the titlebar.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>draggable</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ draggable: false });</code></pre>
</dd>
<dt>
Get or set the <code>draggable</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var draggable = $( ".selector" ).dialog( "option", "draggable" );
//setter
$( ".selector" ).dialog( "option", "draggable", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-height">
<div class="option-header">
<h3 class="option-name"><a href="#option-height">height</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'auto'</dd>
</dl>
</div>
<div class="option-description">
<p>The height of the dialog, in pixels. Specifying 'auto' is also supported to make the dialog adjust based on its content.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>height</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ height: 530 });</code></pre>
</dd>
<dt>
Get or set the <code>height</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var height = $( ".selector" ).dialog( "option", "height" );
//setter
$( ".selector" ).dialog( "option", "height", 530 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-hide">
<div class="option-header">
<h3 class="option-name"><a href="#option-hide">hide</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used when the dialog is closed.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>hide</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ hide: 'slide' });</code></pre>
</dd>
<dt>
Get or set the <code>hide</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var hide = $( ".selector" ).dialog( "option", "hide" );
//setter
$( ".selector" ).dialog( "option", "hide", 'slide' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-maxHeight">
<div class="option-header">
<h3 class="option-name"><a href="#option-maxHeight">maxHeight</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>The maximum height to which the dialog can be resized, in pixels.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>maxHeight</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ maxHeight: 400 });</code></pre>
</dd>
<dt>
Get or set the <code>maxHeight</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var maxHeight = $( ".selector" ).dialog( "option", "maxHeight" );
//setter
$( ".selector" ).dialog( "option", "maxHeight", 400 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-maxWidth">
<div class="option-header">
<h3 class="option-name"><a href="#option-maxWidth">maxWidth</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>The maximum width to which the dialog can be resized, in pixels.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>maxWidth</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ maxWidth: 600 });</code></pre>
</dd>
<dt>
Get or set the <code>maxWidth</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var maxWidth = $( ".selector" ).dialog( "option", "maxWidth" );
//setter
$( ".selector" ).dialog( "option", "maxWidth", 600 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minHeight">
<div class="option-header">
<h3 class="option-name"><a href="#option-minHeight">minHeight</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">150</dd>
</dl>
</div>
<div class="option-description">
<p>The minimum height to which the dialog can be resized, in pixels.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>minHeight</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ minHeight: 300 });</code></pre>
</dd>
<dt>
Get or set the <code>minHeight</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minHeight = $( ".selector" ).dialog( "option", "minHeight" );
//setter
$( ".selector" ).dialog( "option", "minHeight", 300 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-minWidth">
<div class="option-header">
<h3 class="option-name"><a href="#option-minWidth">minWidth</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">150</dd>
</dl>
</div>
<div class="option-description">
<p>The minimum width to which the dialog can be resized, in pixels.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>minWidth</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ minWidth: 400 });</code></pre>
</dd>
<dt>
Get or set the <code>minWidth</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var minWidth = $( ".selector" ).dialog( "option", "minWidth" );
//setter
$( ".selector" ).dialog( "option", "minWidth", 400 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-modal">
<div class="option-header">
<h3 class="option-name"><a href="#option-modal">modal</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>modal</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ modal: true });</code></pre>
</dd>
<dt>
Get or set the <code>modal</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var modal = $( ".selector" ).dialog( "option", "modal" );
//setter
$( ".selector" ).dialog( "option", "modal", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-position">
<div class="option-header">
<h3 class="option-name"><a href="#option-position">position</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'center'</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies where the dialog should be displayed. Possible values: <br />1) a single string representing position within viewport: 'center', 'left', 'right', 'top', 'bottom'. <br />2) an array containing an <em>x,y</em> coordinate pair in pixel offset from left, top corner of viewport (e.g. [350,100]) <br />3) an array containing <em>x,y</em> position string values (e.g. ['right','top'] for top right corner).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>position</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ position: 'top' });</code></pre>
</dd>
<dt>
Get or set the <code>position</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var position = $( ".selector" ).dialog( "option", "position" );
//setter
$( ".selector" ).dialog( "option", "position", 'top' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-resizable">
<div class="option-header">
<h3 class="option-name"><a href="#option-resizable">resizable</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the dialog will be resizeable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>resizable</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ resizable: false });</code></pre>
</dd>
<dt>
Get or set the <code>resizable</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var resizable = $( ".selector" ).dialog( "option", "resizable" );
//setter
$( ".selector" ).dialog( "option", "resizable", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-show">
<div class="option-header">
<h3 class="option-name"><a href="#option-show">show</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used when the dialog is opened.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>show</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ show: 'slide' });</code></pre>
</dd>
<dt>
Get or set the <code>show</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var show = $( ".selector" ).dialog( "option", "show" );
//setter
$( ".selector" ).dialog( "option", "show", 'slide' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-stack">
<div class="option-header">
<h3 class="option-name"><a href="#option-stack">stack</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>stack</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ stack: false });</code></pre>
</dd>
<dt>
Get or set the <code>stack</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var stack = $( ".selector" ).dialog( "option", "stack" );
//setter
$( ".selector" ).dialog( "option", "stack", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-title">
<div class="option-header">
<h3 class="option-name"><a href="#option-title">title</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">''</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies the title of the dialog. Any valid HTML may be set as the title. The title can also be specified by the title attribute on the dialog source element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>title</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ title: 'Dialog Title' });</code></pre>
</dd>
<dt>
Get or set the <code>title</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var title = $( ".selector" ).dialog( "option", "title" );
//setter
$( ".selector" ).dialog( "option", "title", 'Dialog Title' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-width">
<div class="option-header">
<h3 class="option-name"><a href="#option-width">width</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">300</dd>
</dl>
</div>
<div class="option-description">
<p>The width of the dialog, in pixels.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>width</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ width: 460 });</code></pre>
</dd>
<dt>
Get or set the <code>width</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var width = $( ".selector" ).dialog( "option", "width" );
//setter
$( ".selector" ).dialog( "option", "width", 460 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-zIndex">
<div class="option-header">
<h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1000</dd>
</dl>
</div>
<div class="option-description">
<p>The starting z-index for the dialog.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a dialog with the <code>zIndex</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({ zIndex: 3999 });</code></pre>
</dd>
<dt>
Get or set the <code>zIndex</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var zIndex = $( ".selector" ).dialog( "option", "zIndex" );
//setter
$( ".selector" ).dialog( "option", "zIndex", 3999 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dialog is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>dialogcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-beforeClose">
<div class="event-header">
<h3 class="event-name"><a href="#event-beforeClose">beforeClose</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogbeforeclose</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a dialog attempts to close. If the beforeClose event handler (callback function) returns false, the close will be prevented.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>beforeClose</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
beforeClose: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>beforeClose</code> event by type: <code>dialogbeforeclose</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogbeforeclose", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-open">
<div class="event-header">
<h3 class="event-name"><a href="#event-open">open</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogopen</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dialog is opened.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>open</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
open: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>open</code> event by type: <code>dialogopen</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogopen", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-focus">
<div class="event-header">
<h3 class="event-name"><a href="#event-focus">focus</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogfocus</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the dialog gains focus.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>focus</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
focus: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>focus</code> event by type: <code>dialogfocus</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogfocus", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-dragStart">
<div class="event-header">
<h3 class="event-name"><a href="#event-dragStart">dragStart</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogdragstart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the beginning of the dialog being dragged.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>dragStart</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
dragStart: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>dragStart</code> event by type: <code>dialogdragstart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogdragstart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-drag">
<div class="event-header">
<h3 class="event-name"><a href="#event-drag">drag</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogdrag</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the dialog is dragged.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>drag</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
drag: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>drag</code> event by type: <code>dialogdrag</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogdrag", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-dragStop">
<div class="event-header">
<h3 class="event-name"><a href="#event-dragStop">dragStop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogdragstop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered after the dialog has been dragged.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>dragStop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
dragStop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>dragStop</code> event by type: <code>dialogdragstop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogdragstop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-resizeStart">
<div class="event-header">
<h3 class="event-name"><a href="#event-resizeStart">resizeStart</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogresizestart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered at the beginning of the dialog being resized.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>resizeStart</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
resizeStart: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>resizeStart</code> event by type: <code>dialogresizestart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogresizestart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-resize">
<div class="event-header">
<h3 class="event-name"><a href="#event-resize">resize</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogresize</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the dialog is resized. <a href="http://www.jsfiddle.net/Jp7TM/18/" class="external text" title="http://www.jsfiddle.net/Jp7TM/18/">demo</a></p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>resize</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
resize: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>resize</code> event by type: <code>dialogresize</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogresize", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-resizeStop">
<div class="event-header">
<h3 class="event-name"><a href="#event-resizeStop">resizeStop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogresizestop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered after the dialog has been resized.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>resizeStop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
resizeStop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>resizeStop</code> event by type: <code>dialogresizestop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogresizestop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-close">
<div class="event-header">
<h3 class="event-name"><a href="#event-close">close</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dialogclose</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the dialog is closed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>close</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).dialog({
close: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>close</code> event by type: <code>dialogclose</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dialogclose", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the dialog functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the dialog.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the dialog.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any dialog option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple dialog options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-dialog element.</p>
</div>
</li>
<li class="method" id="method-close">
<div class="method-header">
<h3 class="method-name"><a href="#method-close">close</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "close"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Close the dialog.</p>
</div>
</li>
<li class="method" id="method-isOpen">
<div class="method-header">
<h3 class="method-name"><a href="#method-isOpen">isOpen</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "isOpen"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns true if the dialog is currently open.</p>
</div>
</li>
<li class="method" id="method-moveToTop">
<div class="method-header">
<h3 class="method-name"><a href="#method-moveToTop">moveToTop</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "moveToTop"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Move the dialog to the top of the dialogs stack.</p>
</div>
</li>
<li class="method" id="method-open">
<div class="method-header">
<h3 class="method-name"><a href="#method-open">open</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.dialog( "open"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Open the dialog.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Dialog plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.dialog.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-dialog</strong> ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable"><br />
<div class="<strong>ui-dialog-titlebar</strong> ui-widget-header ui-corner-all ui-helper-clearfix"><br />
<span id="<strong>ui-dialog-title-dialog</strong>" class="ui-dialog-title">Dialog title</span><br />
<a class="<strong>ui-dialog-titlebar-close</strong> ui-corner-all" href="#"><span class="ui-icon ui-icon-closethick">close</span></a><br />
</div><br />
<div style="height: 200px; min-height: 109px; width: auto;" class="<strong>ui-dialog-content</strong> ui-widget-content" id="dialog"><br />
<p>Dialog content goes here.</p><br />
</div><br />
</div><br />
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the dialog plugin, not markup you should use to create a dialog. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 66533 bytes
Post-expand include size: 111347 bytes
Template argument size: 61352 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3775-1!1!0!!en!2 and timestamp 20110801231500 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/dialog.html | HTML | art | 44,305 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Accordion</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>Make the selected elements Accordion widgets. Semantic requirements:</p>
<p>The markup of your accordion container needs pairs of headers and content panels:</p>
<pre><div id="accordion">
<h3><a href="#">First header</a></h3>
<div>First content</div>
<h3><a href="#">Second header</a></h3>
<div>Second content</div>
</div></pre>
<p>If you use a different element for the header, specify the header-option with an appropriate selector, eg. header: 'a.header'. The content element must be always next to its header.</p>
<p>If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: 'a.header'.</p>
<p>Use activate(Number) to change the active content programmatically.</p>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/API/1.8/Accordion?section=1" title="Edit section: NOTE: If you want multiple sections open at once, don't use an accordion">edit</a>]</div><a name="NOTE:_If_you_want_multiple_sections_open_at_once.2C_don.27t_use_an_accordion"></a><h4>NOTE: If you want multiple sections open at once, don't use an accordion</h4>
<p>An accordion doesn't allow more than one content panel to be open at the same time, and it takes a lot of effort to do that. If you are looking for a widget that allows more than one content panel to be open, don't use this. Usually it can be written with a few lines of jQuery instead, something like this:</p>
<pre>jQuery(document).ready(function(){
$('.accordion .head').click(function() {
$(this).next().toggle();
return false;
}).next().hide();
});</pre>
<p>Or animated:</p>
<pre>jQuery(document).ready(function(){
$('.accordion .head').click(function() {
$(this).next().toggle('slow');
return false;
}).next().hide();
});</pre>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Effects Core (Optional - only for non-default animations)</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="310">
A simple jQuery UI Accordion.<br />
</p>
<pre>$("#accordion").accordion();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#accordion").accordion();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.
</p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
mauris vel est.
</p>
<p>
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos.
</p>
</div>
</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the accordion. Can be set when initialising (first creating) the accordion.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).accordion( "option", "disabled" );
//setter
$( ".selector" ).accordion( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-active">
<div class="option-header">
<h3 class="option-name"><a href="#option-active">active</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Element, jQuery, Boolean, Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">first child</dd>
</dl>
</div>
<div class="option-description">
<p>Selector for the active element. Set to false to display none at start. Needs <code>collapsible: true</code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>active</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ active: 2 });</code></pre>
</dd>
<dt>
Get or set the <code>active</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var active = $( ".selector" ).accordion( "option", "active" );
//setter
$( ".selector" ).accordion( "option", "active", 2 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-animated">
<div class="option-header">
<h3 class="option-name"><a href="#option-animated">animated</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'slide'</dd>
</dl>
</div>
<div class="option-description">
<p>Choose your favorite animation, or disable them (set to false). In addition to the default, 'bounceslide' and all defined easing methods are supported ('bounceslide' requires UI Effects Core).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>animated</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ animated: 'bounceslide' });</code></pre>
</dd>
<dt>
Get or set the <code>animated</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var animated = $( ".selector" ).accordion( "option", "animated" );
//setter
$( ".selector" ).accordion( "option", "animated", 'bounceslide' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-autoHeight">
<div class="option-header">
<h3 class="option-name"><a href="#option-autoHeight">autoHeight</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set, the highest content part is used as height reference for all other parts. Provides more consistent animations.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>autoHeight</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ autoHeight: false });</code></pre>
</dd>
<dt>
Get or set the <code>autoHeight</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var autoHeight = $( ".selector" ).accordion( "option", "autoHeight" );
//setter
$( ".selector" ).accordion( "option", "autoHeight", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-clearStyle">
<div class="option-header">
<h3 class="option-name"><a href="#option-clearStyle">clearStyle</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set, clears height and overflow styles after finishing animations. This enables accordions to work with dynamic content. Won't work together with autoHeight.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>clearStyle</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ clearStyle: true });</code></pre>
</dd>
<dt>
Get or set the <code>clearStyle</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var clearStyle = $( ".selector" ).accordion( "option", "clearStyle" );
//setter
$( ".selector" ).accordion( "option", "clearStyle", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-collapsible">
<div class="option-header">
<h3 class="option-name"><a href="#option-collapsible">collapsible</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Whether all the sections can be closed at once. Allows collapsing the active section by the triggering event (click is the default).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>collapsible</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ collapsible: true });</code></pre>
</dd>
<dt>
Get or set the <code>collapsible</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var collapsible = $( ".selector" ).accordion( "option", "collapsible" );
//setter
$( ".selector" ).accordion( "option", "collapsible", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-event">
<div class="option-header">
<h3 class="option-name"><a href="#option-event">event</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'click'</dd>
</dl>
</div>
<div class="option-description">
<p>The event on which to trigger the accordion.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>event</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ event: 'mouseover' });</code></pre>
</dd>
<dt>
Get or set the <code>event</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var event = $( ".selector" ).accordion( "option", "event" );
//setter
$( ".selector" ).accordion( "option", "event", 'mouseover' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-fillSpace">
<div class="option-header">
<h3 class="option-name"><a href="#option-fillSpace">fillSpace</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set, the accordion completely fills the height of the parent element. Overrides autoheight.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>fillSpace</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ fillSpace: true });</code></pre>
</dd>
<dt>
Get or set the <code>fillSpace</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var fillSpace = $( ".selector" ).accordion( "option", "fillSpace" );
//setter
$( ".selector" ).accordion( "option", "fillSpace", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-header">
<div class="option-header">
<h3 class="option-name"><a href="#option-header">header</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, jQuery</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'> li > :first-child,> :not(li):even'</dd>
</dl>
</div>
<div class="option-description">
<p>Selector for the header element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>header</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ header: 'h3' });</code></pre>
</dd>
<dt>
Get or set the <code>header</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var header = $( ".selector" ).accordion( "option", "header" );
//setter
$( ".selector" ).accordion( "option", "header", 'h3' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-icons">
<div class="option-header">
<h3 class="option-name"><a href="#option-icons">icons</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">{ 'header': 'ui-icon-triangle-1-e', 'headerSelected': 'ui-icon-triangle-1-s' }</dd>
</dl>
</div>
<div class="option-description">
<p>Icons to use for headers. Icons may be specified for 'header' and 'headerSelected', and we recommend using the icons native to the jQuery UI CSS Framework manipulated by <a href="http://www.themeroller.com" class="external text" title="http://www.themeroller.com">jQuery UI ThemeRoller</a></p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>icons</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' } });</code></pre>
</dd>
<dt>
Get or set the <code>icons</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var icons = $( ".selector" ).accordion( "option", "icons" );
//setter
$( ".selector" ).accordion( "option", "icons", { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-navigation">
<div class="option-header">
<h3 class="option-name"><a href="#option-navigation">navigation</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set, looks for the anchor that matches location.href and activates it. Great for href-based state-saving. Use navigationFilter to implement your own matcher.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>navigation</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ navigation: true });</code></pre>
</dd>
<dt>
Get or set the <code>navigation</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var navigation = $( ".selector" ).accordion( "option", "navigation" );
//setter
$( ".selector" ).accordion( "option", "navigation", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-navigationFilter">
<div class="option-header">
<h3 class="option-name"><a href="#option-navigationFilter">navigationFilter</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default"> </dd>
</dl>
</div>
<div class="option-description">
<p>Overwrite the default location.href-matching with your own matcher.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a accordion with the <code>navigationFilter</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({ navigationFilter: function(){ ... } });</code></pre>
</dd>
<dt>
Get or set the <code>navigationFilter</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var navigationFilter = $( ".selector" ).accordion( "option", "navigationFilter" );
//setter
$( ".selector" ).accordion( "option", "navigationFilter", function(){ ... } );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">accordioncreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when accordion is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>accordioncreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "accordioncreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-change">
<div class="event-header">
<h3 class="event-name"><a href="#event-change">change</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">accordionchange</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered every time the accordion changes. If the accordion is animated, the event will be triggered upon completion of the animation; otherwise, it is triggered immediately.
</p>
<pre>$('.ui-accordion').bind('accordionchange', function(event, ui) {
ui.newHeader // jQuery object, activated header
ui.oldHeader // jQuery object, previous header
ui.newContent // jQuery object, activated content
ui.oldContent // jQuery object, previous content
});</pre></p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>change</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({
change: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>change</code> event by type: <code>accordionchange</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "accordionchange", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<p>
<li class="event" id="event-changestart">
<div class="event-header">
<h3 class="event-name"><a href="#event-changestart">changestart</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">accordionchangestart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered every time the accordion starts to change.
</p>
<pre>$('.ui-accordion').bind('accordionchangestart', function(event, ui) {
ui.newHeader // jQuery object, activated header
ui.oldHeader // jQuery object, previous header
ui.newContent // jQuery object, activated content
ui.oldContent // jQuery object, previous content
});</pre></p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>changestart</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).accordion({
changestart: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>changestart</code> event by type: <code>accordionchangestart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "accordionchangestart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the accordion functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<p>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the accordion.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the accordion.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any accordion option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple accordion options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-accordion element.</p>
</div>
</li>
<li class="method" id="method-activate">
<div class="method-header">
<h3 class="method-name"><a href="#method-activate">activate</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "activate"
, index
)</dd>
</dl>
</div>
<div class="method-description">
<p>Activate a content part of the Accordion programmatically. The index can be a zero-indexed number to match the position of the header to close or a Selector matching an element. Pass <code>false</code> to close all (only possible with <code>collapsible:true</code>).</p>
</div>
</li>
<li class="method" id="method-resize">
<div class="method-header">
<h3 class="method-name"><a href="#method-resize">resize</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.accordion( "resize"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Recompute heights of the accordion contents when using the fillSpace option and the container height changed. For example, when the container is a resizable, this method should be called by its resize-event.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Accordion plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.accordion.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-accordion</strong> ui-widget ui-helper-reset"><br />
<h3 class="<strong>ui-accordion-header</strong> ui-helper-reset ui-state-active ui-corner-top"><br />
<span class="ui-icon ui-icon-triangle-1-s"/><br />
<a href="#">Section 1</a><br />
</h3><br />
<div class="<strong>ui-accordion-content</strong> ui-helper-reset ui-widget-content ui-corner-bottom <strong>ui-accordion-content-active</strong>"><br />
Section 1 content<br />
</div><br />
<h3 class="<strong>ui-accordion-header</strong> ui-helper-reset ui-state-default ui-corner-all"><br />
<span class="ui-icon ui-icon-triangle-1-e"/><br />
<a href="#">Section 2</a><br />
</h3><br />
<div class="<strong>ui-accordion-content</strong> ui-helper-reset ui-widget-content ui-corner-bottom"><br />
Section 2 content<br />
</div><br />
<h3 class="<strong>ui-accordion-header</strong> ui-helper-reset ui-state-default ui-corner-all"><br />
<span class="ui-icon ui-icon-triangle-1-e"/><br />
<a href="#">Section 3</a><br />
</h3><br />
<div class="<strong>ui-accordion-content</strong> ui-helper-reset ui-widget-content ui-corner-bottom"><br />
Section 3 content<br />
</div><br />
</div><br />
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the accordion plugin, not markup you should use to create a accordion. The only markup needed for that is <br /><div><br />
   <h3><a href="#">Section 1</a></h3><br />
   <div><br />
      Section 1 content<br />
   </div><br />
   <h3><a href="#">Section 2</a></h3><br />
   <div><br />
      Section 2 content<br />
   </div><br />
   <h3><a href="#">Section 3</a></h3><br />
   <div><br />
      Section 3 content<br />
   </div><br />
</div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 38072 bytes
Post-expand include size: 64737 bytes
Template argument size: 35841 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3773-1!1!0!!en!2 and timestamp 20110801231413 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/accordion.html | HTML | art | 30,591 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI toggle</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/toggle?section=1" title="Edit section: toggle( effect, [options], [speed], [callback] )">edit</a>]</div><a name="toggle.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>toggle( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
<p>The enhanced toggle method optionally accepts jQuery UI advanced effects.</p>
<p>Uses a specific effect on an element to toggle the element if the first argument is an effect string.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Apply the effect slide if you click on the p to toggle a div.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">toggle</strong>("slide", {}, 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
<style type="text/css">
div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">toggle</strong>("slide", {}, 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me</p><div></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-effect">
<div class="option-header">
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
</div>
</li>
<li class="option" id="option-options">
<div class="option-header">
<h3 class="option-name"><a href="#option-options">options</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Hash</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A object/hash including specific options for the effect.</p>
</div>
</li>
<li class="option" id="option-speed">
<div class="option-header">
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
<li class="option" id="option-callback">
<div class="option-header">
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A function that is called after the effect is completed.</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 6372 bytes
Post-expand include size: 8797 bytes
Template argument size: 5515 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2615-1!1!0!!en!2 and timestamp 20110801224240 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/toggle.html | HTML | art | 5,293 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Slider</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Slider plugin makes selected elements into sliders. There are various options such as multiple handles, and ranges. The handle can be moved with the mouse or the arrow keys.</p>
<p>All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
</p><p>The slider widget will create handle elements with the class 'ui-slider-handle' on initialization. You can specify custom handle elements by creating and appending the elements and adding the 'ui-slider-handle' class before init. It will only create the number of handles needed to match the length of value/values. For example, if you specify 'values: [1, 5, 18]' and create one custom handle, the plugin will create the other two.
</p>
<ul>
<li><b>ui.handle</b>: DOMElement - the current focused handle
<li><b>ui.value</b>: Integer - the current handle's value
</ul>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="">
A simple jQuery UI Slider.<br />
</p>
<pre>$("#slider").slider();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#slider { margin: 10px; }
</style>
<script>
$(document).ready(function() {
$("#slider").slider();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="slider"></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the slider. Can be set when initialising (first creating) the slider.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).slider( "option", "disabled" );
//setter
$( ".selector" ).slider( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-animate">
<div class="option-header">
<h3 class="option-name"><a href="#option-animate">animate</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, String, Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Whether to slide handle smoothly when user click outside handle on the bar. Will also accept a string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>animate</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ animate: true });</code></pre>
</dd>
<dt>
Get or set the <code>animate</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var animate = $( ".selector" ).slider( "option", "animate" );
//setter
$( ".selector" ).slider( "option", "animate", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-max">
<div class="option-header">
<h3 class="option-name"><a href="#option-max">max</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">100</dd>
</dl>
</div>
<div class="option-description">
<p>The maximum value of the slider.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>max</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ max: 7 });</code></pre>
</dd>
<dt>
Get or set the <code>max</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var max = $( ".selector" ).slider( "option", "max" );
//setter
$( ".selector" ).slider( "option", "max", 7 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-min">
<div class="option-header">
<h3 class="option-name"><a href="#option-min">min</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>The minimum value of the slider.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>min</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ min: -7 });</code></pre>
</dd>
<dt>
Get or set the <code>min</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var min = $( ".selector" ).slider( "option", "min" );
//setter
$( ".selector" ).slider( "option", "min", -7 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-orientation">
<div class="option-header">
<h3 class="option-name"><a href="#option-orientation">orientation</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'horizontal'</dd>
</dl>
</div>
<div class="option-description">
<p>This option determines whether the slider has the min at the left, the max at the right or the min at the bottom, the max at the top. Possible values: 'horizontal', 'vertical'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>orientation</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ orientation: 'vertical' });</code></pre>
</dd>
<dt>
Get or set the <code>orientation</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var orientation = $( ".selector" ).slider( "option", "orientation" );
//setter
$( ".selector" ).slider( "option", "orientation", 'vertical' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-range">
<div class="option-header">
<h3 class="option-name"><a href="#option-range">range</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the slider will detect if you have two handles and create a stylable range element between these two. Two other possible values are 'min' and 'max'. A min range goes from the slider min to one handle. A max range goes from one handle to the slider max.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>range</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ range: 'min' });</code></pre>
</dd>
<dt>
Get or set the <code>range</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var range = $( ".selector" ).slider( "option", "range" );
//setter
$( ".selector" ).slider( "option", "range", 'min' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-step">
<div class="option-header">
<h3 class="option-name"><a href="#option-step">step</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Determines the size or amount of each interval or step the slider takes between min and max. The full specified value range of the slider (max - min) needs to be evenly divisible by the step.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>step</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ step: 5 });</code></pre>
</dd>
<dt>
Get or set the <code>step</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var step = $( ".selector" ).slider( "option", "step" );
//setter
$( ".selector" ).slider( "option", "step", 5 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-value">
<div class="option-header">
<h3 class="option-name"><a href="#option-value">value</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Number</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>value</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ value: 37 });</code></pre>
</dd>
<dt>
Get or set the <code>value</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var value = $( ".selector" ).slider( "option", "value" );
//setter
$( ".selector" ).slider( "option", "value", 37 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-values">
<div class="option-header">
<h3 class="option-name"><a href="#option-values">values</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">null</dd>
</dl>
</div>
<div class="option-description">
<p>This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a slider with the <code>values</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({ values: [1,5,9] });</code></pre>
</dd>
<dt>
Get or set the <code>values</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var values = $( ".selector" ).slider( "option", "values" );
//setter
$( ".selector" ).slider( "option", "values", [1,5,9] );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">slidecreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when slider is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>slidecreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "slidecreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">slidestart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the user starts sliding.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>slidestart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "slidestart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-slide">
<div class="event-header">
<h3 class="event-name"><a href="#event-slide">slide</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">slide</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered on every mouse move during slide. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.
</p><p>Return false in order to prevent a slide, based on ui.value.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>slide</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({
slide: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>slide</code> event by type: <code>slide</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "slide", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-change">
<div class="event-header">
<h3 class="event-name"><a href="#event-change">change</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">slidechange</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered on slide stop, or if the value is changed programmatically (by the <code>value</code> method). Takes arguments event and ui. Use event.orginalEvent to detect whether the value changed by mouse, keyboard, or programmatically. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(this).slider('values', index) to get another handle's value.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>change</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({
change: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>change</code> event by type: <code>slidechange</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "slidechange", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">slidestop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the user stops sliding.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).slider({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>slidestop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "slidestop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the slider functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the slider.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the slider.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any slider option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple slider options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-slider element.</p>
</div>
</li>
<li class="method" id="method-value">
<div class="method-header">
<h3 class="method-name"><a href="#method-value">value</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "value"
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Gets or sets the value of the slider. For single handle sliders.</p>
</div>
</li>
<li class="method" id="method-values">
<div class="method-header">
<h3 class="method-name"><a href="#method-values">values</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.slider( "values"
, index
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Gets or sets the values of the slider. For multiple handle or range sliders.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Slider plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.slider.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="ui-slider<strong> ui-slider-horizontal</strong> ui-widget ui-widget-content ui-corner-all"><br />
<a style="left: 0%;" class="<strong>ui-slider-handle</strong> ui-state-default ui-corner-all" href="#"></a><br />
</div><br />
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the slider plugin, not markup you should use to create a slider. The only markup needed for that is <div><div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 36451 bytes
Post-expand include size: 55582 bytes
Template argument size: 27644 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3776-1!1!0!!en!2 and timestamp 20110801231449 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/slider.html | HTML | art | 23,039 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Sortable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Sortable plugin makes selected elements sortable by dragging with the mouse.</p>
<p>All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p>
<ul>
<li><b>ui.helper</b> - the current helper element (most often a clone of the item)</li>
<li><b>ui.position</b> - current position of the helper</li>
<li><b>ui.offset</b> - current absolute position of the helper</li>
<li><b>ui.item</b> - the current dragged element</li>
<li><b>ui.placeholder</b> - the placeholder (if you defined one)</li>
<li><b>ui.sender</b> - the sortable where the item comes from (only exists if you move from one connected list to another)</li>
</ul>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
A simple jQuery UI Sortable.<br />
</p>
<pre>$("#sortable").sortable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#sortable").sortable();
});
</script>
</head>
<body style="font-size:62.5%;">
<ul id="sortable">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the sortable. Can be set when initialising (first creating) the sortable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).sortable( "option", "disabled" );
//setter
$( ".selector" ).sortable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-appendTo">
<div class="option-header">
<h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'parent'</dd>
</dl>
</div>
<div class="option-description">
<p>Defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>appendTo</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ appendTo: 'body' });</code></pre>
</dd>
<dt>
Get or set the <code>appendTo</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var appendTo = $( ".selector" ).sortable( "option", "appendTo" );
//setter
$( ".selector" ).sortable( "option", "appendTo", 'body' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-axis">
<div class="option-header">
<h3 class="option-name"><a href="#option-axis">axis</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If defined, the items can be dragged only horizontally or vertically. Possible values:'x', 'y'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>axis</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ axis: 'x' });</code></pre>
</dd>
<dt>
Get or set the <code>axis</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var axis = $( ".selector" ).sortable( "option", "axis" );
//setter
$( ".selector" ).sortable( "option", "axis", 'x' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cancel">
<div class="option-header">
<h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">':input,button'</dd>
</dl>
</div>
<div class="option-description">
<p>Prevents sorting if you start on elements matching the selector.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>cancel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ cancel: 'button' });</code></pre>
</dd>
<dt>
Get or set the <code>cancel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cancel = $( ".selector" ).sortable( "option", "cancel" );
//setter
$( ".selector" ).sortable( "option", "cancel", 'button' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-connectWith">
<div class="option-header">
<h3 class="option-name"><a href="#option-connectWith">connectWith</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Takes a jQuery selector with items that also have sortables applied. If used, the sortable is now connected to the other one-way, so you can drag from this sortable to the other.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>connectWith</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ connectWith: '.otherlist' });</code></pre>
</dd>
<dt>
Get or set the <code>connectWith</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var connectWith = $( ".selector" ).sortable( "option", "connectWith" );
//setter
$( ".selector" ).sortable( "option", "connectWith", '.otherlist' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-containment">
<div class="option-header">
<h3 class="option-name"><a href="#option-containment">containment</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Element, String, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains dragging to within the bounds of the specified element - can be a DOM element, 'parent', 'document', 'window', or a jQuery selector.
</p><p>Note: the element specified for containment must have a calculated width and height (though it need not be explicit), so for example, if you have float:left sortable children and specify containment:'parent' be sure to have float:left on the sortable/parent container as well or it will have height: 0, causing undefined behavior.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>containment</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ containment: 'parent' });</code></pre>
</dd>
<dt>
Get or set the <code>containment</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var containment = $( ".selector" ).sortable( "option", "containment" );
//setter
$( ".selector" ).sortable( "option", "containment", 'parent' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursor">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursor">cursor</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'auto'</dd>
</dl>
</div>
<div class="option-description">
<p>Defines the cursor that is being shown while sorting.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>cursor</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ cursor: 'crosshair' });</code></pre>
</dd>
<dt>
Get or set the <code>cursor</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursor = $( ".selector" ).sortable( "option", "cursor" );
//setter
$( ".selector" ).sortable( "option", "cursor", 'crosshair' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursorAt">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursorAt">cursorAt</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Moves the sorting element or helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>cursorAt</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ cursorAt: 'top' });</code></pre>
</dd>
<dt>
Get or set the <code>cursorAt</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursorAt = $( ".selector" ).sortable( "option", "cursorAt" );
//setter
$( ".selector" ).sortable( "option", "cursorAt", 'top' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Time in milliseconds to define when the sorting should start. It helps preventing unwanted drags when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ delay: 500 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).sortable( "option", "delay" );
//setter
$( ".selector" ).sortable( "option", "delay", 500 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-distance">
<div class="option-header">
<h3 class="option-name"><a href="#option-distance">distance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Tolerance, in pixels, for when sorting should start. If specified, sorting will not start until after mouse is dragged beyond distance. Can be used to allow for clicks on elements within a handle.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>distance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ distance: 30 });</code></pre>
</dd>
<dt>
Get or set the <code>distance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var distance = $( ".selector" ).sortable( "option", "distance" );
//setter
$( ".selector" ).sortable( "option", "distance", 30 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-dropOnEmpty">
<div class="option-header">
<h3 class="option-name"><a href="#option-dropOnEmpty">dropOnEmpty</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If false items from this sortable can't be dropped to an empty linked sortable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>dropOnEmpty</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ dropOnEmpty: false });</code></pre>
</dd>
<dt>
Get or set the <code>dropOnEmpty</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var dropOnEmpty = $( ".selector" ).sortable( "option", "dropOnEmpty" );
//setter
$( ".selector" ).sortable( "option", "dropOnEmpty", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-forceHelperSize">
<div class="option-header">
<h3 class="option-name"><a href="#option-forceHelperSize">forceHelperSize</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If true, forces the helper to have a size.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>forceHelperSize</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ forceHelperSize: true });</code></pre>
</dd>
<dt>
Get or set the <code>forceHelperSize</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var forceHelperSize = $( ".selector" ).sortable( "option", "forceHelperSize" );
//setter
$( ".selector" ).sortable( "option", "forceHelperSize", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-forcePlaceholderSize">
<div class="option-header">
<h3 class="option-name"><a href="#option-forcePlaceholderSize">forcePlaceholderSize</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If true, forces the placeholder to have a size.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>forcePlaceholderSize</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ forcePlaceholderSize: true });</code></pre>
</dd>
<dt>
Get or set the <code>forcePlaceholderSize</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var forcePlaceholderSize = $( ".selector" ).sortable( "option", "forcePlaceholderSize" );
//setter
$( ".selector" ).sortable( "option", "forcePlaceholderSize", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-grid">
<div class="option-header">
<h3 class="option-name"><a href="#option-grid">grid</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Snaps the sorting element or helper to a grid, every x and y pixels. Array values: [x, y]</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>grid</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ grid: [50, 20] });</code></pre>
</dd>
<dt>
Get or set the <code>grid</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var grid = $( ".selector" ).sortable( "option", "grid" );
//setter
$( ".selector" ).sortable( "option", "grid", [50, 20] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-handle">
<div class="option-header">
<h3 class="option-name"><a href="#option-handle">handle</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Element</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Restricts sort start click to the specified element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>handle</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ handle: 'h2' });</code></pre>
</dd>
<dt>
Get or set the <code>handle</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var handle = $( ".selector" ).sortable( "option", "handle" );
//setter
$( ".selector" ).sortable( "option", "handle", 'h2' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-helper">
<div class="option-header">
<h3 class="option-name"><a href="#option-helper">helper</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'original'</dd>
</dl>
</div>
<div class="option-description">
<p>Allows for a helper element to be used for dragging display. The supplied function receives the event and the element being sorted, and should return a DOMElement to be used as a custom proxy helper. Possible values: 'original', 'clone'</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>helper</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ helper: 'clone' });</code></pre>
</dd>
<dt>
Get or set the <code>helper</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var helper = $( ".selector" ).sortable( "option", "helper" );
//setter
$( ".selector" ).sortable( "option", "helper", 'clone' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-items">
<div class="option-header">
<h3 class="option-name"><a href="#option-items">items</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'> *'</dd>
</dl>
</div>
<div class="option-description">
<p>Specifies which items inside the element should be sortable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>items</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ items: 'li' });</code></pre>
</dd>
<dt>
Get or set the <code>items</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var items = $( ".selector" ).sortable( "option", "items" );
//setter
$( ".selector" ).sortable( "option", "items", 'li' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-opacity">
<div class="option-header">
<h3 class="option-name"><a href="#option-opacity">opacity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Float</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Defines the opacity of the helper while sorting. From 0.01 to 1</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>opacity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ opacity: 0.6 });</code></pre>
</dd>
<dt>
Get or set the <code>opacity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var opacity = $( ".selector" ).sortable( "option", "opacity" );
//setter
$( ".selector" ).sortable( "option", "opacity", 0.6 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-placeholder">
<div class="option-header">
<h3 class="option-name"><a href="#option-placeholder">placeholder</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Class that gets applied to the otherwise white space.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>placeholder</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ placeholder: 'ui-state-highlight' });</code></pre>
</dd>
<dt>
Get or set the <code>placeholder</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var placeholder = $( ".selector" ).sortable( "option", "placeholder" );
//setter
$( ".selector" ).sortable( "option", "placeholder", 'ui-state-highlight' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-revert">
<div class="option-header">
<h3 class="option-name"><a href="#option-revert">revert</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean/Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the item will be reverted to its new DOM position with a smooth animation. Optionally, it can also be set to a number that controls the duration of the animation in ms.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>revert</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ revert: true });</code></pre>
</dd>
<dt>
Get or set the <code>revert</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var revert = $( ".selector" ).sortable( "option", "revert" );
//setter
$( ".selector" ).sortable( "option", "revert", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scroll">
<div class="option-header">
<h3 class="option-name"><a href="#option-scroll">scroll</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the page scrolls when coming to an edge.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>scroll</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ scroll: false });</code></pre>
</dd>
<dt>
Get or set the <code>scroll</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scroll = $( ".selector" ).sortable( "option", "scroll" );
//setter
$( ".selector" ).sortable( "option", "scroll", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSensitivity">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSensitivity">scrollSensitivity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>Defines how near the mouse must be to an edge to start scrolling.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>scrollSensitivity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ scrollSensitivity: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSensitivity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSensitivity = $( ".selector" ).sortable( "option", "scrollSensitivity" );
//setter
$( ".selector" ).sortable( "option", "scrollSensitivity", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSpeed">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSpeed">scrollSpeed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>scrollSpeed</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ scrollSpeed: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSpeed</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSpeed = $( ".selector" ).sortable( "option", "scrollSpeed" );
//setter
$( ".selector" ).sortable( "option", "scrollSpeed", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-tolerance">
<div class="option-header">
<h3 class="option-name"><a href="#option-tolerance">tolerance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">'intersect'</dd>
</dl>
</div>
<div class="option-description">
<p>This is the way the reordering behaves during drag. Possible values: 'intersect', 'pointer'. In some setups, 'pointer' is more natural.
</p>
<ul>
<li><b>intersect</b>: draggable overlaps the droppable at least 50%</li>
<li><b>pointer</b>: mouse pointer overlaps the droppable</li>
</ul>
<p></p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>tolerance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ tolerance: 'pointer' });</code></pre>
</dd>
<dt>
Get or set the <code>tolerance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var tolerance = $( ".selector" ).sortable( "option", "tolerance" );
//setter
$( ".selector" ).sortable( "option", "tolerance", 'pointer' );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-zIndex">
<div class="option-header">
<h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1000</dd>
</dl>
</div>
<div class="option-description">
<p>Z-index for element/helper while being sorted.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a sortable with the <code>zIndex</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({ zIndex: 5 });</code></pre>
</dd>
<dt>
Get or set the <code>zIndex</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var zIndex = $( ".selector" ).sortable( "option", "zIndex" );
//setter
$( ".selector" ).sortable( "option", "zIndex", 5 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when sortable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>sortcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortstart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when sorting starts.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>sortstart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortstart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-sort">
<div class="event-header">
<h3 class="event-name"><a href="#event-sort">sort</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sort</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered during sorting.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>sort</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
sort: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>sort</code> event by type: <code>sort</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sort", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-change">
<div class="event-header">
<h3 class="event-name"><a href="#event-change">change</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortchange</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered during sorting, but only when the DOM position has changed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>change</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
change: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>change</code> event by type: <code>sortchange</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortchange", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-beforeStop">
<div class="event-header">
<h3 class="event-name"><a href="#event-beforeStop">beforeStop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortbeforestop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when sorting stops, but when the placeholder/helper is still available.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>beforeStop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
beforeStop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>beforeStop</code> event by type: <code>sortbeforestop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortbeforestop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortstop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when sorting has stopped.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>sortstop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortstop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-update">
<div class="event-header">
<h3 class="event-name"><a href="#event-update">update</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortupdate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the user stopped sorting and the DOM position has changed.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>update</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
update: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>update</code> event by type: <code>sortupdate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortupdate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-receive">
<div class="event-header">
<h3 class="event-name"><a href="#event-receive">receive</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortreceive</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a connected sortable list has received an item from another list.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>receive</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
receive: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>receive</code> event by type: <code>sortreceive</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortreceive", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-remove">
<div class="event-header">
<h3 class="event-name"><a href="#event-remove">remove</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortremove</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a sortable item has been dragged out from the list and into another.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>remove</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
remove: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>remove</code> event by type: <code>sortremove</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortremove", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-over">
<div class="event-header">
<h3 class="event-name"><a href="#event-over">over</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortover</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a sortable item is moved into a connected list.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>over</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
over: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>over</code> event by type: <code>sortover</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortover", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-out">
<div class="event-header">
<h3 class="event-name"><a href="#event-out">out</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortout</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when a sortable item is moved away from a connected list.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>out</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
out: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>out</code> event by type: <code>sortout</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortout", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-activate">
<div class="event-header">
<h3 class="event-name"><a href="#event-activate">activate</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortactivate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when using connected lists, every connected list on drag start receives it.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>activate</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
activate: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>activate</code> event by type: <code>sortactivate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortactivate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-deactivate">
<div class="event-header">
<h3 class="event-name"><a href="#event-deactivate">deactivate</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">sortdeactivate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when sorting was stopped, is propagated to all possible connected lists.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>deactivate</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).sortable({
deactivate: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>deactivate</code> event by type: <code>sortdeactivate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "sortdeactivate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the sortable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the sortable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the sortable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any sortable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple sortable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-sortable element.</p>
</div>
</li>
<li class="method" id="method-serialize">
<div class="method-header">
<h3 class="method-name"><a href="#method-serialize">serialize</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "serialize"
, <span class="optional">[</span>options<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Serializes the sortable's item id's into a form/ajax submittable string. Calling this method produces a hash that can be appended to any url to easily submit a new item order back to the server.
</p><p>It works by default by looking at the id of each item in the format 'setname_number', and it spits out a hash like "setname[]=number&setname[]=number".
</p><p>You can also give in a option hash as second argument to custom define how the function works. The possible options are: 'key' (replaces part1[] with whatever you want), 'attribute' (test another attribute than 'id') and 'expression' (use your own regexp).
</p><p>If serialize returns an empty string, make sure the id attributes include an underscore. They must be in the form: "set_number" For example, a 3 element list with id attributes foo_1, foo_5, foo_2 will serialize to foo[]=1&foo[]=5&foo[]=2. You can use an underscore, equal sign or hyphen to separate the set and number. For example foo=1 or foo-1 or foo_1 all serialize to foo[]=1.</p>
</div>
</li>
<li class="method" id="method-toArray">
<div class="method-header">
<h3 class="method-name"><a href="#method-toArray">toArray</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "toArray"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Serializes the sortable's item id's into an array of string. If you have
</p>
<pre>
<ul id="a_sortable"><br>
<li id="hello">Hello</li><br>
<li id="goodbye">Good bye</li><br>
</ul>
</pre>
<p>and do
</p>
<pre>var result = $('#a_sortable').sortable('toArray');</pre>
<p>then
</p>
<pre>result[0] will contain "hello" and result[1] will contain "goodbye".</pre></p>
</div>
</li>
<p>
<li class="method" id="method-refresh">
<div class="method-header">
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "refresh"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Refresh the sortable items. Custom trigger the reloading of all sortable items, causing new items to be recognized.</p>
</div>
</li>
<li class="method" id="method-refreshPositions">
<div class="method-header">
<h3 class="method-name"><a href="#method-refreshPositions">refreshPositions</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "refreshPositions"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Refresh the cached positions of the sortables' items. Calling this method refreshes the cached item positions of all sortables. This is usually done automatically by the script and slows down performance. Use wisely.</p>
</div>
</li>
<li class="method" id="method-cancel">
<div class="method-header">
<h3 class="method-name"><a href="#method-cancel">cancel</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.sortable( "cancel"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Cancels a change in the current sortable and reverts it back to how it was before the current sort started. Useful in the stop and receive callback functions.
</p><p>If the sortable item is not being moved from one connected sortable to another:
</p>
<pre>$(this).sortable('cancel');</pre>
<p>will cancel the change.
</p><p>If the sortable item is being moved from one connected sortable to another:
</p>
<pre>$(ui.sender).sortable('cancel');</pre>
<p>will cancel the change. Useful in the 'receive' callback.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Sortable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.sortable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<ul class="<strong>ui-sortable</strong>"><br />
   <li></li><br />
   <li class="<strong>ui-sortable-helper</strong>"></li><br />
   <li class="<strong>ui-sortable-placeholder</strong>"></li><br />
   <li></li><br />
</ul>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the sortable plugin, not markup you should use to create a sortable. The only markup needed for that is <br /><ul><br />
   <li></li><br />
   <li></li><br />
   <li></li><br />
</ul>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 75037 bytes
Post-expand include size: 131543 bytes
Template argument size: 73917 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3772-1!1!0!!en!2 and timestamp 20110802001239 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/sortable.html | HTML | art | 51,592 |
<p>The jQuery UI effects core extends the <a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a> function to be able to animate colors as well. It's heavily used by the class transition feature and it's able to color animate the following properties:
</p>
<ul><li> <b>backgroundColor</b>
</li><li> <b>borderBottomColor</b>
</li><li> <b>borderLeftColor</b>
</li><li> <b>borderRightColor</b>
</li><li> <b>borderTopColor</b>
</li><li> <b>color</b>
</li><li> <b>outlineColor</b>
</li></ul>
<p>with one of the following combinations:
</p>
<ul><li> <b>hex (#FF0000)</b>
</li><li> <b>rgb (rgb(255,255,255))</b>
</li><li> <b>names ("black")</b>
</li></ul>
<p><br />
</p><p><div class="options list"><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
</table><b class="options">Example:</b><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
<div class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<div id="demo" class="tabs-container" rel="125">
A simple color animation.<br />
</p>
<pre>$(".block").<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "black" }, 1000);
},function() {
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "#68BFEF" }, 500);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<a href="http://www.w3.org/TR/html4/loose.dtd" class="external free" title="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>">
<html>
<head>
<script src="<a href="http://code.jquery.com/jquery-latest.js" class="external free" title="http://code.jquery.com/jquery-latest.js">http://code.jquery.com/jquery-latest.js</a>"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function(){
$(".block").<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "black" }, 1000);
},function() {
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "#68BFEF" }, 500);
});
});
</script>
<style>
.block {
color: white;
background-color: #68BFEF;
width: 150px;
height: 70px;
margin: 10px;
}
</style>
</head>
<body>
<div class="block"> Click me</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</p><p></tbody></table></div>
</p><!--
Pre-expand include size: 3730 bytes
Post-expand include size: 5382 bytes
Template argument size: 3450 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3094-1!1!0!!en!2 and timestamp 20110802001243 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/animate.html | HTML | art | 3,480 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI addClass</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/addClass?section=1" title="Edit section: addClass( class, [duration] )">edit</a>]</div><a name="addClass.28_class.2C_.5Bduration.5D_.29"></a><h3>addClass( class, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
<p>Adds the specified class to each of the set of matched elements with an optional transition between the states.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
Adds the class 'selected' to the matched elements with a one second transition.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">addClass</strong>("selected", 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<style type="text/css">
p { cursor: pointer; font-size: 1.2em; }
.selected { color:red; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$(this).<strong class="selflink">addClass</strong>("selected", 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me to add a 'selected' class.</p>
<p>Click me to add a 'selected' class.</p>
<p>Click me to add a 'selected' class.</p>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-class">
<div class="option-header">
<h3 class="option-name"><a href="#option-class">class</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>One CSS class to add to the elements.</p>
</div>
</li>
<li class="option" id="option-duration">
<div class="option-header">
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 5228 bytes
Post-expand include size: 6863 bytes
Template argument size: 4285 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2606-1!1!0!!en!2 and timestamp 20110801224230 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/addClass.html | HTML | art | 4,052 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Position Utility</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>Utility script for positioning any widget relative to the window, document, a particular element, or the cursor/mouse.</p>
<p><em>Note: jQuery UI does not support positioning hidden elements.</em></p>
<p>Does not need ui.core.js or effects.core.js.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li><i>none (only jQuery core)</i></li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="300">
Clicking on the green element transfers to the other.<br />
</p>
<pre>
$("#position1").position({
my: "center",
at: "center",
of: "#targetElement"
});
$("#position2").position({
my: "left top",
at: "left top",
of: "#targetElement"
});
$("#position3").position({
my: "right center",
at: "right bottom",
of: "#targetElement"
});
$(document).mousemove(function(ev){
$("#position4").position({
my: "left bottom",
of: ev,
offset: "3 -3",
collision: "fit"
});
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#targetElement { width:240px;height:200px;background-color:#999;margin:30px auto; }
.positionDiv { width:50px;height:50px;opacity:0.6; }
#position1 {background-color:#F00;}
#position2 {background-color:#0F0;}
#position3 {background-color:#00F;}
#position4 {background-color:#FF0;}
</style>
<script>
$(document).ready(function() {
$("#position1").position({
my: "center",
at: "center",
of: "#targetElement"
});
$("#position2").position({
my: "left top",
at: "left top",
of: "#targetElement"
});
$("#position3").position({
my: "right center",
at: "right bottom",
of: "#targetElement"
});
$(document).mousemove(function(ev){
$("#position4").position({
my: "left bottom",
of: ev,
offset: "3 -3",
collision: "fit"
});
});
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="targetElement">
<div class="positionDiv" id="position1"></div>
<div class="positionDiv" id="position2"></div>
<div class="positionDiv" id="position3"></div>
<div class="positionDiv" id="position4"></div>
</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-my">
<div class="option-header">
<h3 class="option-name"><a href="#option-my">my</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>Defines which position on <b>the element being positioned</b> to align with the target element: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center"</p>
</div>
</li>
<li class="option" id="option-at">
<div class="option-header">
<h3 class="option-name"><a href="#option-at">at</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>Defines which position on <b>the target element</b> to align the positioned element against: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center"</p>
</div>
</li>
<li class="option" id="option-of">
<div class="option-header">
<h3 class="option-name"><a href="#option-of">of</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Element, jQuery, Event</dd>
</dl>
</div>
<div class="option-description">
<p>Element to position against. If you provide a selector, the first matching element will be used. If you provide a jQuery object, the first element will be used. If you provide an event object, the pageX and pageY properties will be used. Example: "#top-menu"</p>
</div>
</li>
<li class="option" id="option-offset">
<div class="option-header">
<h3 class="option-name"><a href="#option-offset">offset</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>Add these left-top values to the calculated position, eg. "50 50" (left top) A single value such as "50" will apply to both.</p>
</div>
</li>
<li class="option" id="option-collision">
<div class="option-header">
<h3 class="option-name"><a href="#option-collision">collision</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>When the positioned element overflows the window in some direction, move it to an alternative position. Similar to my and at, this accepts a single value or a pair for horizontal/vertical, eg. "flip", "fit", "fit flip", "fit none".
</p>
<ul><li> <b>flip</b>: to the opposite side and the collision detection is run again to see if it will fit. If it won't fit in either position, the center option should be used as a fall back.
</li><li> <b>fit</b>: so the element keeps in the desired direction, but is re-positioned so it fits.
</li><li> <b>none</b>: not do collision detection.
</li></ul>
<p></p>
</div>
</li>
<li class="option" id="option-using">
<div class="option-header">
<h3 class="option-name"><a href="#option-using">using</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
</dl>
</div>
<div class="option-description">
<p>When specified the actual property setting is delegated to this callback. Receives a single parameter which is a hash of top and left values for the position that should be set.</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 7124 bytes
Post-expand include size: 11012 bytes
Template argument size: 7642 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3784-1!1!0!!en!2 and timestamp 20110802001242 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/position.html | HTML | art | 7,851 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI effect</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/effect?section=1" title="Edit section: effect( effect, [options], [speed], [callback] )">edit</a>]</div><a name="effect.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>effect( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
<p>Uses a specific effect on an element (without the show/hide logic).</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Apply the effect explode if you click on the element.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">effect</strong>("explode");
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.explode.js"></script>
<style type="text/css">
div { margin: 0 auto; width: 100px; height: 80px; background: blue; position: relative; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">effect</strong>("explode");
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me</p><div></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-effect">
<div class="option-header">
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used. Possible values: 'blind', 'bounce', 'clip', 'drop', 'explode', 'fold', 'highlight', 'puff', 'pulsate', 'scale', 'shake', 'size', 'slide', 'transfer'.</p>
</div>
</li>
<li class="option" id="option-options">
<div class="option-header">
<h3 class="option-name"><a href="#option-options">options</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Hash</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A object/hash including specific options for the effect.</p>
</div>
</li>
<li class="option" id="option-speed">
<div class="option-header">
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
<li class="option" id="option-callback">
<div class="option-header">
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A function that is called after the effect is completed.</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 6364 bytes
Post-expand include size: 8780 bytes
Template argument size: 5498 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2612-1!1!0!!en!2 and timestamp 20110801224236 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/effect.html | HTML | art | 5,205 |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Arguments</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI hide</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/hide?section=1" title="Edit section: hide( effect, [options], [speed], [callback] )">edit</a>]</div><a name="hide.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>hide( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
<p>The enhanced hide method optionally accepts jQuery UI advanced effects.</p>
<p>Uses a specific effect on an element to hide the element if the first argument is an effect string.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>Effects Core</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Apply the effect slide if you click on the p to hide a div.<br />
</p>
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">hide</strong>("slide", {}, 1000);
});
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
<style type="text/css">
div { margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
</style>
<script>
$(document).ready(function() {
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
$("div").<strong class="selflink">hide</strong>("slide", {}, 1000);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<p>Click me</p><div></div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Arguments</h2>
<ul class="options-list">
<li class="option" id="option-effect">
<div class="option-header">
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
</dl>
</div>
<div class="option-description">
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
</div>
</li>
<li class="option" id="option-options">
<div class="option-header">
<h3 class="option-name"><a href="#option-options">options</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Hash</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A object/hash including specific options for the effect.</p>
</div>
</li>
<li class="option" id="option-speed">
<div class="option-header">
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Number</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
</div>
</li>
<li class="option" id="option-callback">
<div class="option-header">
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Function</dd>
<dt class="option-optional-label">Optional</dt>
</dl>
</div>
<div class="option-description">
<p>A function that is called after the effect is completed.</p>
</div>
</li>
</ul>
</div>
</div>
</p><!--
Pre-expand include size: 6354 bytes
Post-expand include size: 8727 bytes
Template argument size: 5453 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2614-1!1!0!!en!2 and timestamp 20110801224254 -->
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/docs/hide.html | HTML | art | 5,258 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/toggleClass/index.html | HTML | art | 328 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - toggleClass Demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect {position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
<script>
$(function() {
$( "#button" ).click(function() {
$( "#effect" ).toggleClass( "newClass", 1000 );
return false;
});
});
</script>
</head>
<body>
<div class="demo">
<div class="toggler">
<div id="effect" class="newClass ui-corner-all">
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
</div>
</div>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
<div class="demo-description">
<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/toggleClass/default.html | HTML | art | 1,352 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Delay start</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable, #resizable2 { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3, #resizable2 h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
delay: 1000
});
$( "#resizable2" ).resizable({
distance: 40
});
});
</script>
</head>
<body>
<div class="demo">
<h3 class="docs">Time delay (ms):</h3>
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Time</h3>
</div>
<h3 class="docs">Distance delay (px):</h3>
<div id="resizable2" class="ui-widget-content">
<h3 class="ui-widget-header">Distance</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Delay the start of resizng for a number of milliseconds with the <code>delay</code> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/delay-start.html | HTML | art | 1,452 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="aspect-ratio.html">Preserve aspect ratio</a></li>
<li><a href="max-min.html">Maximum / minimum size</a></li>
<li><a href="constrain-area.html">Constrain resize area</a></li>
<li><a href="delay-start.html">Delay start</a></li>
<li><a href="snap-to-grid.html">Snap to grid</a></li>
<li><a href="visual-feedback.html">Visual feedback</a></li>
<li><a href="synchronous-resize.html">Synchronous resize</a></li>
<li><a href="animate.html">Animate</a></li>
<li><a href="helper.html">Resize Helper</a></li>
<li><a href="textarea.html">Textarea</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/index.html | HTML | art | 909 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Textarea</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.ui-resizable-se {
bottom: 17px;
}
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
handles: "se"
});
});
</script>
</head>
<body>
<div class="demo">
<textarea id="resizable" rows="5" cols="20"></textarea>
</div><!-- End demo -->
<div class="demo-description">
<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/textarea.html | HTML | art | 966 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Snap to grid</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
grid: 50
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Grid</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/snap-to-grid.html | HTML | art | 1,099 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Helper</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-helper { border: 2px dotted #00F; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
helper: "ui-resizable-helper"
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Helper</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/helper.html | HTML | art | 1,143 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Synchronous resize</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { background-position: top left; }
#resizable, #also { width: 150px; height: 120px; padding: 0.5em; }
#resizable h3, #also h3 { text-align: center; margin: 0; }
#also { margin-top: 1em; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
alsoResize: "#also"
});
$( "#also" ).resizable();
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-header">
<h3 class="ui-state-active">Resize</h3>
</div>
<div id="also" class="ui-widget-content">
<h3 class="ui-widget-header">will also resize</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the <code>alsoResize</code> option.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/synchronous-resize.html | HTML | art | 1,350 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable();
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Resizable</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/default.html | HTML | art | 1,090 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Visual feedback</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-ghost { border: 1px dotted gray; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
ghost: true
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Ghost</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Instead of showing the actual element during resize, set the <code>ghost</code> option to true to show a semi-transparent part of the element.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/visual-feedback.html | HTML | art | 1,163 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Animate</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-helper { border: 1px dotted gray; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
animate: true
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Animate</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Animate the resize action using the <code>animate</code> option (boolean). When this option is set to true, drag the outline to the desired location; the element animates to that size on drag stop.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/animate.html | HTML | art | 1,215 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Maximum / minimum size</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 200px; height: 150px; padding: 5px; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
maxHeight: 250,
maxWidth: 350,
minHeight: 150,
minWidth: 200
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Resize larger / smaller</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Limit the resizable element to a maximum or minimum height or width using the <code>maxHeight</code>, <code>maxWidth</code>, <code>minHeight</code>, and <code>minWidth</code> options.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/max-min.html | HTML | art | 1,235 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Preserve aspect ratio</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#resizable { width: 160px; height: 90px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
aspectRatio: 16 / 9
});
});
</script>
</head>
<body>
<div class="demo">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Preserve aspect ratio</h3>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the <code>aspectRatio</code> option to true, and optionally pass in a new ratio (i.e., 4/3)</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/aspect-ratio.html | HTML | art | 1,187 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Constrain resize area</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#container { width: 300px; height: 300px; }
#container h3 { text-align: center; margin: 0; margin-bottom: 10px; }
#resizable { background-position: top left; width: 150px; height: 150px; }
#resizable, #container { padding: 0.5em; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
containment: "#container"
});
});
</script>
</head>
<body>
<div class="demo">
<div id="container" class="ui-widget-content">
<h3 class="ui-widget-header">Containment</h3>
<div id="resizable" class="ui-state-active">
<h3 class="ui-widget-header">Resizable</h3>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Define the boundaries of the resizable area. Use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/resizable/constrain-area.html | HTML | art | 1,377 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/switchClass/index.html | HTML | art | 328 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - switchClass Demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect {position: relative; }
.newClass { width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; margin: 0; }
.anotherNewClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
<script>
$(function() {
$( "#button" ).click(function(){
$( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 );
$( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 );
return false;
});
});
</script>
</head>
<body>
<div class="demo">
<div class="toggler">
<div id="effect" class="newClass ui-corner-all">
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
</div>
</div>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
<div class="demo-description">
<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/switchClass/default.html | HTML | art | 1,430 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Demos</title>
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="demos.css">
<script src="../jquery-1.6.2.js"></script>
<script src="../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../ui/jquery.ui.core.js"></script>
<script src="../ui/jquery.ui.widget.js"></script>
<script src="../ui/jquery.ui.mouse.js"></script>
<script src="../ui/jquery.ui.accordion.js"></script>
<script src="../ui/jquery.ui.autocomplete.js"></script>
<script src="../ui/jquery.ui.button.js"></script>
<script src="../ui/jquery.ui.datepicker.js"></script>
<script src="../ui/jquery.ui.dialog.js"></script>
<script src="../ui/jquery.ui.draggable.js"></script>
<script src="../ui/jquery.ui.droppable.js"></script>
<script src="../ui/jquery.ui.position.js"></script>
<script src="../ui/jquery.ui.progressbar.js"></script>
<script src="../ui/jquery.ui.resizable.js"></script>
<script src="../ui/jquery.ui.selectable.js"></script>
<script src="../ui/jquery.ui.slider.js"></script>
<script src="../ui/jquery.ui.sortable.js"></script>
<script src="../ui/jquery.ui.tabs.js"></script>
<script src="../ui/jquery.effects.core.js"></script>
<script src="../ui/jquery.effects.blind.js"></script>
<script src="../ui/jquery.effects.bounce.js"></script>
<script src="../ui/jquery.effects.clip.js"></script>
<script src="../ui/jquery.effects.drop.js"></script>
<script src="../ui/jquery.effects.explode.js"></script>
<script src="../ui/jquery.effects.fold.js"></script>
<script src="../ui/jquery.effects.highlight.js"></script>
<script src="../ui/jquery.effects.pulsate.js"></script>
<script src="../ui/jquery.effects.scale.js"></script>
<script src="../ui/jquery.effects.shake.js"></script>
<script src="../ui/jquery.effects.slide.js"></script>
<script src="../ui/jquery.effects.transfer.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-af.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ar.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ar-DZ.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-az.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-bs.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-bg.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ca.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-cs.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-da.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-de.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-el.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-en-AU.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-en-NZ.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-eo.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-es.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-et.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-eu.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-fa.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-fi.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-fo.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-fr.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-gl.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-he.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hr.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hu.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hy.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-id.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-is.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-it.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ja.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ko.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-kz.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-lt.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-lv.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ml.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ms.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-nl.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-no.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-pl.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-pt.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-rm.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ro.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ru.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sk.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sl.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sq.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sr.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-sv.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ta.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-th.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-tj.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-tr.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-uk.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-vi.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
<script>
$(function() {
$('.left-nav a').click(function(ev) {
window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default';
loadPage(this.href);
$('.left-nav a.selected').removeClass('selected');
$(this).addClass('selected');
ev.preventDefault();//阻止元素的默认行为,如单击超链接会跳转,单击‘提交’按钮后表单会提交等
});
if (window.location.hash) {
if (window.location.hash.indexOf('|') === -1) {
window.location.hash += '|default';
}
var path = window.location.href.replace(/(index\.html)?#/,'');
path = path.replace('\|','/') + '.html';
loadPage(path);
}
function loadPage(path) {
var section = path.replace(/\/[^\/]+\.html/,'');
var header = section.replace(/.+\/([^\/]+)/,'$1').replace(/_/, ' ');
$('td.normal div.normal')
.empty()
.append('<h4 class="demo-subheader">Functional demo:</h4>')
.append('<h3 class="demo-header">'+ header +'</h3>')
.append('<div id="demo-config"></div>')
.find('#demo-config')
.append('<div id="demo-frame"></div><div id="demo-config-menu"></div><div id="demo-link"><a class="demoWindowLink" href="#"><span class="ui-icon ui-icon-newwin"></span>Open demo in a new window</a></div>')
.find('#demo-config-menu')
.load(section + '/index.html .demos-nav', function() {
$('#demo-config-menu a').each(function() {
this.setAttribute('href', section + '/' + this.getAttribute('href').replace(/.+\/([^\/]+)/,'$1'));
$(this).attr('target', 'demo-frame');
$(this).click(function() {
resetDemos();
$(this).parents('ul').find('li').removeClass('demo-config-on');
$(this).parent().addClass('demo-config-on');
$('#demo-notes').fadeOut();
//Set the hash to the actual page without ".html"
window.location.hash = header + '|' + this.getAttribute('href').match((/\/([^\/\\]+)\.html/))[1];
loadDemo(this.getAttribute('href'));
return false;
});
});
if (window.location.hash) {
var demo = window.location.hash.split('|')[1];
$('#demo-config-menu a').each(function(){
if (this.href.indexOf(demo + '.html') !== -1) {
$(this).parents('ul').find('li').removeClass('demo-config-on');
$(this).parent().addClass('demo-config-on');
loadDemo(this.href);
}
});
}
updateDemoNotes();
})
.end()
.find('#demo-link a')
.bind('click', function(ev){
window.open(this.href);
ev.preventDefault();
})
.end()
.end()
;
resetDemos();
}
function loadDemo(path) {
var directory = path.match(/([^\/]+)\/[^\/\.]+\.html$/)[1];
$.get(path, function(data) {
var source = data;
data = data.replace(/<script.*>.*<\/script>/ig,""); // Remove script tags
data = data.replace(/<\/?link.*>/ig,""); //Remove link tags
data = data.replace(/<\/?html.*>/ig,""); //Remove html tag
data = data.replace(/<\/?body.*>/ig,""); //Remove body tag
data = data.replace(/<\/?head.*>/ig,""); //Remove head tag
data = data.replace(/<\/?!doctype.*>/ig,""); //Remove doctype
data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title tags
data = data.replace(/((href|src)=["'])(?!(http|#))/ig, "$1" + directory + "/");
$('#demo-style').remove();
$('#demo-frame').empty().html(data);
$('#demo-frame style').clone().appendTo('head').attr('id','demo-style');
$('#demo-link a').attr('href', path);
updateDemoNotes();
updateDemoSource(source);
if (/default.html$/.test(path)) {
$.get("documentation/docs-" + path.match(/demos\/(.+)\//)[1] + ".html", function(html) {
$("#demo-source").after(html);
$("#widget-docs").tabs();
$(".param-header").click(function() {
$(this).parent().toggleClass("param-open").end().next().toggle();
});
$(".docs-list-header").each(function() {
var header = $(this);
var details = header.next().find(".param-details").hide();
$("a:first", header).click(function() {
details.show().parent().addClass("param-open");
return false;
});
$("a:last", header).click(function() {
details.hide().parent().removeClass("param-open");
return false;
});
});
});
}
});
}
function updateDemoNotes() {
var notes = $('#demo-frame .demo-description');
if ($('#demo-notes').length == 0) {
$('<div id="demo-notes"></div>').insertAfter('#demo-config');
}
$('#demo-notes').hide().empty().html(notes.html());
$('#demo-notes').show();
notes.hide();
}
function updateDemoSource(source) {
if ($('#demo-source').length == 0) {
$('<div id="demo-source"><a href="#" class="source-closed">View Source</a><div><pre><code></code></pre></div></div>').insertAfter('#demo-notes');
$('#demo-source').find(">a").click(function() {
$(this).toggleClass("source-closed").toggleClass("source-open").next().toggle();
return false;
}).end().find(">div").hide();
}
var cleanedSource = source
.replace('themes/base/jquery.ui.all.css', 'theme/jquery.ui.all.css')
.replace(/\s*\x3Clink.*demos\x2Ecss.*\x3E\s*/, '\r\n\t')
.replace(/\x2E\x2E\x2F\x2E\x2E\x2F/g, '');
$('#demo-source code').empty().text(cleanedSource);
}
function resetDemos() {
$.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional['']));
$(".ui-dialog-content").remove();
}
});
</script>
</head>
<body>
<table class="layout-grid" cellspacing="0" cellpadding="0">
<tr>
<td class="left-nav">
<dl class="demos-nav">
<dt>Interactions</dt>
<dd><a href="draggable/index.html">Draggable</a></dd>
<dd><a href="droppable/index.html">Droppable</a></dd>
<dd><a href="resizable/index.html">Resizable</a></dd>
<dd><a href="selectable/index.html">Selectable</a></dd>
<dd><a href="sortable/index.html">Sortable</a></dd>
<dt>Widgets</dt>
<dd><a href="accordion/index.html">Accordion</a></dd>
<dd><a href="autocomplete/index.html">Autocomplete</a></dd>
<dd><a href="button/index.html">Button</a></dd>
<dd><a href="datepicker/index.html">Datepicker</a></dd>
<dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd>
<dd><a href="tabs/index.html">Tabs</a></dd>
<dt>Effects</dt>
<dd><a href="animate/index.html">Color Animation</a></dd>
<dd><a href="toggleClass/index.html">Toggle Class</a></dd>
<dd><a href="addClass/index.html">Add Class</a></dd>
<dd><a href="removeClass/index.html">Remove Class</a></dd>
<dd><a href="switchClass/index.html">Switch Class</a></dd>
<dd><a href="effect/index.html">Effect</a></dd>
<dd><a href="toggle/index.html">Toggle</a></dd>
<dd><a href="hide/index.html">Hide</a></dd>
<dd><a href="show/index.html">Show</a></dd>
<dt>Utilities</dt>
<dd><a href="position/index.html">Position</a></dd>
<dt>About jQuery UI</dt>
<dd><a href="http://jqueryui.com/docs/Getting_Started">Getting Started</a></dd>
<dd><a href="http://jqueryui.com/docs/Upgrade_Guide">Upgrade Guide</a></dd>
<dd><a href="http://jqueryui.com/docs/Changelog">Changelog</a></dd>
<dd><a href="http://jqueryui.com/docs/Roadmap">Roadmap</a></dd>
<dd><a href="http://jqueryui.com/docs/Subversion">Subversion Access</a></dd>
<dd><a href="http://jqueryui.com/docs/Developer_Guide">UI Developer Guidelines</a></dd>
<dt>Theming</dt>
<dd><a href="http://jqueryui.com/docs/Theming">Theming jQuery UI</a></dd>
<dd><a href="http://jqueryui.com/docs/Theming/API">jQuery UI CSS Framework</a></dd>
<dd><a href="http://jqueryui.com/docs/Theming/Themeroller">ThemeRoller application</a></dd>
<dd><a href="http://jqueryui.com/docs/Theming/ThemeSwitcher">Theme Switcher Widget</a></dd>
</dl>
</td>
<td class="normal">
<div class="normal">
<h3>Instructions</h3>
<p>
These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them.
</p>
</div>
</td>
</tr>
</table>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/index.html | HTML | art | 14,221 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/show/index.html | HTML | art | 328 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - Show Demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.effects.blind.js"></script>
<script src="../../ui/jquery.effects.bounce.js"></script>
<script src="../../ui/jquery.effects.clip.js"></script>
<script src="../../ui/jquery.effects.drop.js"></script>
<script src="../../ui/jquery.effects.explode.js"></script>
<script src="../../ui/jquery.effects.fold.js"></script>
<script src="../../ui/jquery.effects.highlight.js"></script>
<script src="../../ui/jquery.effects.pulsate.js"></script>
<script src="../../ui/jquery.effects.scale.js"></script>
<script src="../../ui/jquery.effects.shake.js"></script>
<script src="../../ui/jquery.effects.slide.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
</style>
<script>
$(function() {
// run the currently selected effect
function runEffect() {
// get effect type from
var selectedEffect = $( "#effectTypes" ).val();
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
if ( selectedEffect === "scale" ) {
options = { percent: 100 };
} else if ( selectedEffect === "size" ) {
options = { to: { width: 280, height: 185 } };
}
// run the effect
$( "#effect" ).show( selectedEffect, options, 500, callback );
};
//callback function to bring a hidden box back
function callback() {
setTimeout(function() {
$( "#effect:visible" ).removeAttr( "style" ).fadeOut();
}, 1000 );
};
// set effect from select menu value
$( "#button" ).click(function() {
runEffect();
return false;
});
$( "#effect" ).hide();
});
</script>
</head>
<body>
<div class="demo">
<div class="toggler">
<div id="effect" class="ui-widget-content ui-corner-all">
<h3 class="ui-widget-header ui-corner-all">Show</h3>
<p>
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
</p>
</div>
</div>
<select name="effects" id="effectTypes">
<option value="blind">Blind</option>
<option value="bounce">Bounce</option>
<option value="clip">Clip</option>
<option value="drop">Drop</option>
<option value="explode">Explode</option>
<option value="fold">Fold</option>
<option value="highlight">Highlight</option>
<option value="puff">Puff</option>
<option value="pulsate">Pulsate</option>
<option value="scale">Scale</option>
<option value="shake">Shake</option>
<option value="size">Size</option>
<option value="slide">Slide</option>
</select>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
<div class="demo-description">
<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/show/default.html | HTML | art | 3,264 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/addClass/index.html | HTML | art | 328 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - addClass demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; padding: 1em; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
<script>
$(function() {
$( "#button" ).click(function() {
$( "#effect" ).addClass( "newClass", 1000, callback );
return false;
});
function callback() {
setTimeout(function() {
$( "#effect" ).removeClass( "newClass" );
}, 1500 );
}
});
</script>
</head>
<body>
<div class="demo">
<div class="toggler">
<div id="effect" class=" ui-corner-all">
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
</div>
</div>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
<div class="demo-description">
<p>This demo adds a class which animates: text-indent, letter-spacing, width, height, padding, margin, and font-size.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/addClass/default.html | HTML | art | 1,498 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Effect showcase</a></li>
<li><a href="easing.html">Easing showcase</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/effect/index.html | HTML | art | 375 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - Easing demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.graph {
float: left;
margin-left: 10px;
}
</style>
<script>
$(function() {
if ( !$( "<canvas/>" )[0].getContext ) {
$( "<div/>" ).text(
"Your browser doesn't support canvas, which is required for this demo. " +
"Give Firefox 3 a try!"
).appendTo( "#graphs" );
return;
}
var i = 0,
width = 100,
height = 100;
$.each( $.easing, function( name, impl ) {
// skip linear/jswing and any non functioning implementation
if ( !$.isFunction( impl ) || /jswing/.test( name ) ) {
return;
}
var graph = $( "<div/>" ).addClass( "graph" ).appendTo( "#graphs" ),
text = $( "<div/>" ).text( ++i + ". " + name ).appendTo( graph ),
wrap = $( "<div/>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
canvas = $( "<canvas/>" ).appendTo( wrap )[ 0 ];
canvas.width = width;
canvas.height = height;
var drawHeight = height * 0.8,
cradius = 10;
ctx = canvas.getContext( "2d" );
ctx.fillStyle = "black";
ctx.beginPath();
ctx.moveTo( cradius, 0 );
ctx.quadraticCurveTo( 0, 0, 0, cradius );
ctx.lineTo( 0, height - cradius );
ctx.quadraticCurveTo( 0, height, cradius, height );
ctx.lineTo( width - cradius, height );
ctx.quadraticCurveTo( width, height, width, height - cradius );
ctx.lineTo( width, 0 );
ctx.lineTo( cradius, 0 );
ctx.fill();
ctx.strokeStyle = "#555";
ctx.beginPath();
ctx.moveTo( width * 0.1, drawHeight + .5 );
ctx.lineTo( width * 0.9, drawHeight + .5 );
ctx.stroke();
ctx.strokeStyle = "#555";
ctx.beginPath();
ctx.moveTo( width * 0.1, drawHeight * .3 - .5 );
ctx.lineTo( width * 0.9, drawHeight * .3 - .5 );
ctx.stroke();
ctx.strokeStyle = "white";
ctx.beginPath();
ctx.lineWidth = 2;
ctx.moveTo( width * 0.1, drawHeight );
$.each( new Array( width ), function( position ) {
var val = impl( 0, position, 0, 1, height );
if ( /linear|jswing/.test( name ) ) {
val = position / width;
}
ctx.lineTo( position * 0.8 + width * 0.1,
drawHeight - drawHeight * val * 0.7 );
});
ctx.stroke();
graph.click(function() {
wrap
.animate( { height: "hide" }, 2000, name )
.delay( 800 )
.animate( { height: "show" }, 2000, name );
});
graph.width( width ).height( height + text.height() + 10 );
});
});
</script>
</head>
<body>
<div class="demo">
<div id="graphs"></div>
</div><!-- End demo -->
<div class="demo-description">
<p><strong>All easings provided by jQuery UI are drawn above, using a HTML canvas element</strong>. Click a diagram to see the easing in action.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/effect/easing.html | HTML | art | 2,986 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects - Effect demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.effects.blind.js"></script>
<script src="../../ui/jquery.effects.bounce.js"></script>
<script src="../../ui/jquery.effects.clip.js"></script>
<script src="../../ui/jquery.effects.drop.js"></script>
<script src="../../ui/jquery.effects.explode.js"></script>
<script src="../../ui/jquery.effects.fade.js"></script>
<script src="../../ui/jquery.effects.fold.js"></script>
<script src="../../ui/jquery.effects.highlight.js"></script>
<script src="../../ui/jquery.effects.pulsate.js"></script>
<script src="../../ui/jquery.effects.scale.js"></script>
<script src="../../ui/jquery.effects.shake.js"></script>
<script src="../../ui/jquery.effects.slide.js"></script>
<script src="../../ui/jquery.effects.transfer.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
.ui-effects-transfer { border: 2px dotted gray; }
</style>
<script>
$(function() {
// run the currently selected effect
function runEffect() {
// get effect type from
var selectedEffect = $( "#effectTypes" ).val();
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
if ( selectedEffect === "scale" ) {
options = { percent: 0 };
} else if ( selectedEffect === "transfer" ) {
options = { to: "#button", className: "ui-effects-transfer" };
} else if ( selectedEffect === "size" ) {
options = { to: { width: 200, height: 60 } };
}
// run the effect
$( "#effect" ).effect( selectedEffect, options, 500, callback );
};
// callback function to bring a hidden box back
function callback() {
setTimeout(function() {
$( "#effect" ).removeAttr( "style" ).hide().fadeIn();
}, 1000 );
};
// set effect from select menu value
$( "#button" ).click(function() {
runEffect();
return false;
});
});
</script>
</head>
<body>
<div class="demo">
<div class="toggler">
<div id="effect" class="ui-widget-content ui-corner-all">
<h3 class="ui-widget-header ui-corner-all">Effect</h3>
<p>
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
</p>
</div>
</div>
<select name="effects" id="effectTypes">
<option value="blind">Blind</option>
<option value="bounce">Bounce</option>
<option value="clip">Clip</option>
<option value="drop">Drop</option>
<option value="explode">Explode</option>
<option value="fade">Fade</option>
<option value="fold">Fold</option>
<option value="highlight">Highlight</option>
<option value="puff">Puff</option>
<option value="pulsate">Pulsate</option>
<option value="scale">Scale</option>
<option value="shake">Shake</option>
<option value="size">Size</option>
<option value="slide">Slide</option>
<option value="transfer">Transfer</option>
</select>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
<div class="demo-description">
<p>Click the button above to show the effect.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/effect/default.html | HTML | art | 3,631 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Snap to increments</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider" ).slider({
value:100,
min: 0,
max: 500,
step: 50,
slide: function( event, ui ) {
$( "#amount" ).val( "$" + ui.value );
}
});
$( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Donation amount ($50 increments):</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value. The default increment is 1.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/steps.html | HTML | art | 1,330 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed minimum</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider-range-min" ).slider({
range: "min",
value: 37,
min: 1,
max: 700,
slide: function( event, ui ) {
$( "#amount" ).val( "$" + ui.value );
}
});
$( "#amount" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Maximum price:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range-min"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Fix the minimum value of the range slider so that the user can only select a maximum. Set the <code>range</code> option to "min."</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/rangemin.html | HTML | art | 1,325 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="steps.html">Snap to increments</a></li>
<li><a href="range.html">Range slider</a></li>
<li><a href="rangemin.html">Range with fixed minimum</a></li>
<li><a href="hotelrooms.html">Room reservation</a></li>
<li><a href="rangemax.html">Range with fixed maximum</a></li>
<li><a href="slider-vertical.html">Vertical slider</a></li>
<li><a href="range-vertical.html">Vertical range slider</a></li>
<li><a href="multiple-vertical.html">Multiple sliders</a></li>
<li><a href="colorpicker.html">Simple colorpicker</a></li>
<li><a href="side-scroll.html">Simple scrollbar</a></li>
<li><a href="tabs.html">Slider controls tabs</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/index.html | HTML | art | 987 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Snap to increments</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.tabs.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; }
</style>
<script>
$(function() {
$( "#tabs" ).tabs({
select: function( event, ui ) {
$( "#slider" ).slider( "value", ui.index );
}
});
$( "#slider" ).slider({
min: 0,
max: $( "#tabs" ).tabs( "length" ) - 1,
slide: function( event, ui ) {
$( "#tabs" ).tabs( "select", ui.value );
}
});
});
</script>
</head>
<body>
<div class="demo">
<div id="slider" style="width:100px"></div>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
<div id="tabs-2">
<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Control tabs with a slider.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/tabs.html | HTML | art | 3,732 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Multiple sliders</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; }
#eq span {
height:120px; float:left; margin:15px
}
</style>
<script>
$(function() {
// setup master volume
$( "#master" ).slider({
value: 60,
orientation: "horizontal",
range: "min",
animate: true
});
// setup graphic EQ
$( "#eq > span" ).each(function() {
// read initial values from markup and remove that
var value = parseInt( $( this ).text(), 10 );
$( this ).empty().slider({
value: value,
range: "min",
animate: true,
orientation: "vertical"
});
});
});
</script>
</head>
<body class="ui-widget-content" style="border:0;">
<div class="demo">
<p class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding:4px;">
<span class="ui-icon ui-icon-volume-on" style="float:left; margin:-2px 5px 0 0;"></span>
Master volume
</p>
<div id="master" style="width:260px; margin:15px;"></div>
<p class="ui-state-default ui-corner-all" style="padding:4px;margin-top:4em;">
<span class="ui-icon ui-icon-signal" style="float:left; margin:-2px 5px 0 0;"></span>
Graphic EQ
</p>
<div id="eq">
<span>88</span>
<span>77</span>
<span>55</span>
<span>33</span>
<span>40</span>
<span>45</span>
<span>70</span>
</div>
</div><!-- End demo -->
<div class="demo-description" style="clear:left;">
<p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/multiple-vertical.html | HTML | art | 1,986 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Colorpicker</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#red, #green, #blue {
float: left;
clear: left;
width: 300px;
margin: 15px;
}
#swatch {
width: 120px;
height: 100px;
margin-top: 18px;
margin-left: 350px;
background-image: none;
}
#red .ui-slider-range { background: #ef2929; }
#red .ui-slider-handle { border-color: #ef2929; }
#green .ui-slider-range { background: #8ae234; }
#green .ui-slider-handle { border-color: #8ae234; }
#blue .ui-slider-range { background: #729fcf; }
#blue .ui-slider-handle { border-color: #729fcf; }
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
function hexFromRGB(r, g, b) {
var hex = [
r.toString( 16 ),
g.toString( 16 ),
b.toString( 16 )
];
$.each( hex, function( nr, val ) {
if ( val.length === 1 ) {
hex[ nr ] = "0" + val;
}
});
return hex.join( "" ).toUpperCase();
}
function refreshSwatch() {
var red = $( "#red" ).slider( "value" ),
green = $( "#green" ).slider( "value" ),
blue = $( "#blue" ).slider( "value" ),
hex = hexFromRGB( red, green, blue );
$( "#swatch" ).css( "background-color", "#" + hex );
}
$(function() {
$( "#red, #green, #blue" ).slider({
orientation: "horizontal",
range: "min",
max: 255,
value: 127,
slide: refreshSwatch,
change: refreshSwatch
});
$( "#red" ).slider( "value", 255 );
$( "#green" ).slider( "value", 140 );
$( "#blue" ).slider( "value", 60 );
});
</script>
</head>
<body class="ui-widget-content" style="border:0;">
<div class="demo">
<p class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding:4px;">
<span class="ui-icon ui-icon-pencil" style="float:left; margin:-2px 5px 0 0;"></span>
Simple Colorpicker
</p>
<div id="red"></div>
<div id="green"></div>
<div id="blue"></div>
<div id="swatch" class="ui-widget-content ui-corner-all"></div>
</div><!-- End demo -->
<div class="demo-description" style="clear:left;">
<p>Combine three sliders to create a simple RGB colorpicker.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/colorpicker.html | HTML | art | 2,510 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Range slider</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider-range" ).slider({
range: true,
min: 0,
max: 500,
values: [ 75, 300 ],
slide: function( event, ui ) {
$( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
}
});
$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
" - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Price range:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Set the <code>range</code> option to true to capture a range of values with two drag handles. The space between the handles is filled with a different background color to indicate those values are selected.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/range.html | HTML | art | 1,478 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" >
<title>jQuery UI Slider - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; }
</style>
<script>
$(function() {
$( "#slider" ).slider();
});
</script>
</head>
<body>
<div class="demo">
<div id="slider"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/default.html | HTML | art | 932 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Vertical slider</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider-vertical" ).slider({
orientation: "vertical",
range: "min",
min: 0,
max: 100,
value: 60,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
}
});
$( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Volume:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-vertical" style="height:200px;"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Change the orientation of the slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/slider-vertical.html | HTML | art | 1,410 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Slider scrollbar</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; }
.scroll-pane { overflow: auto; width: 99%; float:left; }
.scroll-content { width: 2440px; float: left; }
.scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
* html .scroll-content-item { display: inline; } /* IE6 float double margin bug */
.scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
.scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; }
.scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
.scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }
.scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }
</style>
<script>
$(function() {
//scrollpane parts
var scrollPane = $( ".scroll-pane" ),
scrollContent = $( ".scroll-content" );
//build slider
var scrollbar = $( ".scroll-bar" ).slider({
slide: function( event, ui ) {
if ( scrollContent.width() > scrollPane.width() ) {
scrollContent.css( "margin-left", Math.round(
ui.value / 100 * ( scrollPane.width() - scrollContent.width() )
) + "px" );
} else {
scrollContent.css( "margin-left", 0 );
}
}
});
//append icon to handle
var handleHelper = scrollbar.find( ".ui-slider-handle" )
.mousedown(function() {
scrollbar.width( handleHelper.width() );
})
.mouseup(function() {
scrollbar.width( "100%" );
})
.append( "<span class='ui-icon ui-icon-grip-dotted-vertical'></span>" )
.wrap( "<div class='ui-handle-helper-parent'></div>" ).parent();
//change overflow to hidden now that slider handles the scrolling
scrollPane.css( "overflow", "hidden" );
//size scrollbar and handle proportionally to scroll distance
function sizeScrollbar() {
var remainder = scrollContent.width() - scrollPane.width();
var proportion = remainder / scrollContent.width();
var handleSize = scrollPane.width() - ( proportion * scrollPane.width() );
scrollbar.find( ".ui-slider-handle" ).css({
width: handleSize,
"margin-left": -handleSize / 2
});
handleHelper.width( "" ).width( scrollbar.width() - handleSize );
}
//reset slider value based on scroll content position
function resetValue() {
var remainder = scrollPane.width() - scrollContent.width();
var leftVal = scrollContent.css( "margin-left" ) === "auto" ? 0 :
parseInt( scrollContent.css( "margin-left" ) );
var percentage = Math.round( leftVal / remainder * 100 );
scrollbar.slider( "value", percentage );
}
//if the slider is 100% and window gets larger, reveal content
function reflowContent() {
var showing = scrollContent.width() + parseInt( scrollContent.css( "margin-left" ), 10 );
var gap = scrollPane.width() - showing;
if ( gap > 0 ) {
scrollContent.css( "margin-left", parseInt( scrollContent.css( "margin-left" ), 10 ) + gap );
}
}
//change handle position on window resize
$( window ).resize(function() {
resetValue();
sizeScrollbar();
reflowContent();
});
//init scrollbar size
setTimeout( sizeScrollbar, 10 );//safari wants a timeout
});
</script>
</head>
<body>
<div class="demo">
<div class="scroll-pane ui-widget ui-widget-header ui-corner-all">
<div class="scroll-content">
<div class="scroll-content-item ui-widget-header">1</div>
<div class="scroll-content-item ui-widget-header">2</div>
<div class="scroll-content-item ui-widget-header">3</div>
<div class="scroll-content-item ui-widget-header">4</div>
<div class="scroll-content-item ui-widget-header">5</div>
<div class="scroll-content-item ui-widget-header">6</div>
<div class="scroll-content-item ui-widget-header">7</div>
<div class="scroll-content-item ui-widget-header">8</div>
<div class="scroll-content-item ui-widget-header">9</div>
<div class="scroll-content-item ui-widget-header">10</div>
<div class="scroll-content-item ui-widget-header">11</div>
<div class="scroll-content-item ui-widget-header">12</div>
<div class="scroll-content-item ui-widget-header">13</div>
<div class="scroll-content-item ui-widget-header">14</div>
<div class="scroll-content-item ui-widget-header">15</div>
<div class="scroll-content-item ui-widget-header">16</div>
<div class="scroll-content-item ui-widget-header">17</div>
<div class="scroll-content-item ui-widget-header">18</div>
<div class="scroll-content-item ui-widget-header">19</div>
<div class="scroll-content-item ui-widget-header">20</div>
</div>
<div class="scroll-bar-wrap ui-widget-content ui-corner-bottom">
<div class="scroll-bar"></div>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Use a slider to manipulate the positioning of content on the page. In this case, it acts as a scrollbar with the potential to capture values if needed.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/side-scroll.html | HTML | art | 5,513 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed maximum</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider-range-max" ).slider({
range: "max",
min: 1,
max: 10,
value: 2,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
}
});
$( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Minimum number of bedrooms:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range-max"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Fix the maximum value of the range slider so that the user can only select a minimum. Set the <code>range</code> option to "max."</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/rangemax.html | HTML | art | 1,323 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed minimum</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
var select = $( "#minbeds" );
var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({
min: 1,
max: 6,
range: "min",
value: select[ 0 ].selectedIndex + 1,
slide: function( event, ui ) {
select[ 0 ].selectedIndex = ui.value - 1;
}
});
$( "#minbeds" ).change(function() {
slider.slider( "value", this.selectedIndex + 1 );
});
});
</script>
</head>
<body>
<div class="demo">
<form id="reservation">
<label for="minbeds">Minimum number of beds</label>
<select name="minbeds" id="minbeds">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</form>
</div><!-- End demo -->
<div class="demo-description">
<p>How to bind a slider to an existing select element. The select stays visible to display the change. When the select is changed, the slider is updated, too.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/hotelrooms.html | HTML | art | 1,561 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Slider - Vertical range slider</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.slider.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#demo-frame > div.demo { padding: 10px !important; };
</style>
<script>
$(function() {
$( "#slider-range" ).slider({
orientation: "vertical",
range: true,
values: [ 17, 67 ],
slide: function( event, ui ) {
$( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
}
});
$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
" - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
</head>
<body>
<div class="demo">
<p>
<label for="amount">Target sales goal (Millions):</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range" style="height:250px;"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Change the orientation of the range slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/slider/range-vertical.html | HTML | art | 1,524 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Delay start</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ distance: 20 });
$( "#draggable2" ).draggable({ delay: 1000 });
$( ".ui-draggable" ).disableSelection();
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Only if you drag me by 20 pixels, the dragging will start</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Delay the start of dragging for a number of milliseconds with the <code>delay</code> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option. </p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/delay-start.html | HTML | art | 1,450 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="constrain-movement.html">Constrain movement</a></li>
<li><a href="delay-start.html">Delay start</a></li>
<li><a href="snap-to.html">Snap to element or grid</a></li>
<li><a href="scroll.html">Auto-scroll</a></li>
<li><a href="revert.html">Revert position</a></li>
<li><a href="visual-feedback.html">Visual feedback</a></li>
<li><a href="handle.html">Drag handle</a></li>
<li><a href="cursor-style.html">Cursor style</a></li>
<li><a href="sortable.html">Draggable + Sortable</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/index.html | HTML | art | 892 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Events</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable { width: 16em; padding: 0 1em; }
#draggable ul li { margin: 1em 0; padding: 0.5em 0; } * html #draggable ul li { height: 1%; }
#draggable ul li span.ui-icon { float: left; }
#draggable ul li span.count { font-weight: bold; }
</style>
<script>
$(function() {
var $start_counter = $( "#event-start" ),
$drag_counter = $( "#event-drag" ),
$stop_counter = $( "#event-stop" ),
counts = [ 0, 0, 0 ];
$( "#draggable" ).draggable({
start: function() {
counts[ 0 ]++;
updateCounterStatus( $start_counter, counts[ 0 ] );
},
drag: function() {
counts[ 1 ]++;
updateCounterStatus( $drag_counter, counts[ 1 ] );
},
stop: function() {
counts[ 2 ]++;
updateCounterStatus( $stop_counter, counts[ 2 ] );
}
});
function updateCounterStatus( $event_counter, new_count ) {
// first update the status visually...
if ( !$event_counter.hasClass( "ui-state-hover" ) ) {
$event_counter.addClass( "ui-state-hover" )
.siblings().removeClass( "ui-state-hover" );
}
// ...then update the numbers
$( "span.count", $event_counter ).text( new_count );
}
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget ui-widget-content">
<p>Drag me to trigger the chain of events.</p>
<ul class="ui-helper-reset">
<li id="event-start" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-play"></span>"start" invoked <span class="count">0</span>x</li>
<li id="event-drag" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-arrow-4"></span>"drag" invoked <span class="count">0</span>x</li>
<li id="event-stop" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-stop"></span>"stop" invoked <span class="count">0</span>x</li>
</ul>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Layer functionality onto the draggable using the <code>start</code>, <code>drag</code>, and <code>stop</code> events. Start is fired at the start of the drag; drag during the drag; and stop when dragging stops.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/events.html | HTML | art | 2,619 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Constrain movement</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.draggable { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable, #draggable2 { margin-bottom:20px; }
#draggable { cursor: n-resize; }
#draggable2 { cursor: e-resize; }
#containment-wrapper { width: 95%; height:150px; border:2px solid #ccc; padding: 10px; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ axis: "y" });
$( "#draggable2" ).draggable({ axis: "x" });
$( "#draggable3" ).draggable({ containment: "#containment-wrapper", scroll: false });
$( "#draggable4" ).draggable({ containment: "#demo-frame" });
$( "#draggable5" ).draggable({ containment: "parent" });
});
</script>
</head>
<body>
<div class="demo">
<h3 class="docs">Constrain movement along an axis:</h3>
<div id="draggable" class="draggable ui-widget-content">
<p>I can be dragged only vertically</p>
</div>
<div id="draggable2" class="draggable ui-widget-content">
<p>I can be dragged only horizontally</p>
</div>
<h3 class="docs">Or to within another DOM element:</h3>
<div id="containment-wrapper">
<div id="draggable3" class="draggable ui-widget-content">
<p>I'm contained within the box</p>
</div>
<div id="draggable4" class="draggable ui-widget-content">
<p>I'm contained within the box's parent</p>
</div>
<div class="draggable ui-widget-content">
<p id="draggable5" class="ui-widget-header">I'm contained within my parent</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Constrain the movement of each draggable by defining the boundaries of the draggable area. Set the <code>axis</code> option to limit the draggable's path to the x- or y-axis, or use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/constrain-movement.html | HTML | art | 2,321 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Cursor style</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ cursorAt: { cursor: "move", top: 56, left: 56 } });
$( "#draggable2" ).draggable({ cursorAt: { cursor: "crosshair", top: -5, left: -5 } });
$( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } });
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>I will always stick to the center (relative to the mouse)</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>My cursor is at left -5 and top -5</p>
</div>
<div id="draggable3" class="ui-widget-content">
<p>My cursor position is only controlled for the 'bottom' value</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Position the cursor while dragging the object. By default the cursor appears in the center of the dragged object; use the <code>cursorAt</code> option to specify another location relative to the draggable (specify a pixel value from the top, right, bottom, and/or left). Customize the cursor's appearance by supplying the <code>cursor</code> option with a valid CSS cursor value: default, move, pointer, crosshair, etc.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/cursor-style.html | HTML | art | 1,831 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Snap to element or grid</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.draggable { width: 90px; height: 80px; padding: 5px; float: left; margin: 0 10px 10px 0; font-size: .9em; }
.ui-widget-header p, .ui-widget-content p { margin: 0; }
#snaptarget { height: 140px; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ snap: true });
$( "#draggable2" ).draggable({ snap: ".ui-widget-header" });
$( "#draggable3" ).draggable({ snap: ".ui-widget-header", snapMode: "outer" });
$( "#draggable4" ).draggable({ grid: [ 20,20 ] });
$( "#draggable5" ).draggable({ grid: [ 80, 80 ] });
});
</script>
</head>
<body>
<div class="demo">
<div id="snaptarget" class="ui-widget-header">
<p>I'm a snap target</p>
</div>
<br clear="both" />
<div id="draggable" class="draggable ui-widget-content">
<p>Default (snap: true), snaps to all other draggable elements</p>
</div>
<div id="draggable2" class="draggable ui-widget-content">
<p>I only snap to the big box</p>
</div>
<div id="draggable3" class="draggable ui-widget-content">
<p>I only snap to the outer edges of the big box</p>
</div>
<div id="draggable4" class="draggable ui-widget-content">
<p>I snap to a 20 x 20 grid</p>
</div>
<div id="draggable5" class="draggable ui-widget-content">
<p>I snap to a 80 x 80 grid</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Snap the draggable to the inner or outer boundaries of a DOM element. Use the <code>snap</code>, <code>snapMode</code> (inner, outer, both), and <code>snapTolerance</code> (distance in pixels the draggable must be from the element when snapping is invoked) options. </p>
<p>Or snap the draggable to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/snap-to.html | HTML | art | 2,277 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable { width: 150px; height: 150px; padding: 0.5em; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable();
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/default.html | HTML | art | 1,043 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Revert position</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ revert: true });
$( "#draggable2" ).draggable({ revert: true, helper: "clone" });
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Revert the original</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>Revert the helper</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/revert.html | HTML | art | 1,229 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Handles</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable p { cursor: move; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ handle: "p" });
$( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" });
$( "div, p" ).disableSelection();
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p class="ui-widget-header">I can be dragged only by this handle</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>You can drag me around…</p>
<p class="ui-widget-header">…but you can't drag me by this handle.</p>
</div>
<!-- ADD CANCEL DEMO -->
</div><!-- End demo -->
<div class="demo-description">
<p>Allow dragging only when the cursor is over a specific part of the draggable. Use the <code>handle</code> option to specify the jQuery selector of an element (or group of elements) used to drag the object.</p>
<p>Or prevent dragging when the cursor is over a specific element (or group of elements) within the draggable. Use the <code>cancel</code> option to specify a jQuery selector over which to "cancel" draggable functionality.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/handle.html | HTML | art | 1,754 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable + Sortable</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.sortable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.demo ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
.demo li { margin: 5px; padding: 5px; width: 150px; }
</style>
<script>
$(function() {
$( "#sortable" ).sortable({
revert: true
});
$( "#draggable" ).draggable({
connectToSortable: "#sortable",
helper: "clone",
revert: "invalid"
});
$( "ul, li" ).disableSelection();
});
</script>
</head>
<body>
<div class="demo">
<ul>
<li id="draggable" class="ui-state-highlight">Drag me down</li>
</ul>
<ul id="sortable">
<li class="ui-state-default">Item 1</li>
<li class="ui-state-default">Item 2</li>
<li class="ui-state-default">Item 3</li>
<li class="ui-state-default">Item 4</li>
<li class="ui-state-default">Item 5</li>
</ul>
</div><!-- End demo -->
<div class="demo-description">
<p>Draggables are built to interact seamlessly with <a href="#">sortables</a>.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/sortable.html | HTML | art | 1,486 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Visual feedback</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2, #draggable3, #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable, #draggable2, #draggable3 { margin-bottom:20px; }
#set { clear:both; float:left; width: 368px; height: 120px; }
p { clear:both; margin:0; padding:1em 0; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ helper: "original" });
$( "#draggable2" ).draggable({ opacity: 0.7, helper: "clone" });
$( "#draggable3" ).draggable({
cursor: "move",
cursorAt: { top: -12, left: -20 },
helper: function( event ) {
return $( "<div class='ui-widget-header'>I'm a custom helper</div>" );
}
});
$( "#set div" ).draggable({ stack: "#set div" });
});
</script>
</head>
<body>
<div class="demo">
<h3 class="docs">With helpers:</h3>
<div id="draggable" class="ui-widget-content">
<p>Original</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>Semi-transparent clone</p>
</div>
<div id="draggable3" class="ui-widget-content">
<p>Custom helper (in combination with cursorAt)</p>
</div>
<h3 class="docs">Stacked:</h3>
<div id="set">
<div class="ui-widget-content">
<p>We are draggables..</p>
</div>
<div class="ui-widget-content">
<p>..whose z-indexes are controlled automatically..</p>
</div>
<div class="ui-widget-content">
<p>..with the stack option.</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Provide feedback to users as they drag an object in the form of a helper. The <code>helper</code> option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the <code>opacity</code> option.</p>
<p>To clarify which draggable is in play, bring the draggable in motion to front. Use the <code>zIndex</code> option to set a higher z-index for the helper, if in play, or use the <code>stack</code> option to ensure that the last item dragged will appear on top of others in the same group on drag stop.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/visual-feedback.html | HTML | art | 2,712 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Auto-scroll</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ scroll: true });
$( "#draggable2" ).draggable({ scroll: true, scrollSensitivity: 100 });
$( "#draggable3" ).draggable({ scroll: true, scrollSpeed: 100 });
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Scroll set to true, default settings</p>
</div>
<div id="draggable2" class="ui-widget-content">
<p>scrollSensitivity set to 100</p>
</div>
<div id="draggable3" class="ui-widget-content">
<p>scrollSpeed set to 100</p>
</div>
<div style='height: 5000px; width: 1px;'></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Automatically scroll the document when the draggable is moved beyond the viewport. Set the <code>scroll</code> option to true to enable auto-scrolling, and fine-tune when scrolling is triggered and its speed with the <code>scrollSensitivity</code> and <code>scrollSpeed</code> options.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/draggable/scroll.html | HTML | art | 1,635 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Toolbar</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#toolbar {
padding: 10px 4px;
}
</style>
<script>
$(function() {
$( "#beginning" ).button({
text: false,
icons: {
primary: "ui-icon-seek-start"
}
});
$( "#rewind" ).button({
text: false,
icons: {
primary: "ui-icon-seek-prev"
}
});
$( "#play" ).button({
text: false,
icons: {
primary: "ui-icon-play"
}
})
.click(function() {
var options;
if ( $( this ).text() === "play" ) {
options = {
label: "pause",
icons: {
primary: "ui-icon-pause"
}
};
} else {
options = {
label: "play",
icons: {
primary: "ui-icon-play"
}
};
}
$( this ).button( "option", options );
});
$( "#stop" ).button({
text: false,
icons: {
primary: "ui-icon-stop"
}
})
.click(function() {
$( "#play" ).button( "option", {
label: "play",
icons: {
primary: "ui-icon-play"
}
});
});
$( "#forward" ).button({
text: false,
icons: {
primary: "ui-icon-seek-next"
}
});
$( "#end" ).button({
text: false,
icons: {
primary: "ui-icon-seek-end"
}
});
$( "#shuffle" ).button();
$( "#repeat" ).buttonset();
});
</script>
</head>
<body>
<div class="demo">
<span id="toolbar" class="ui-widget-header ui-corner-all">
<button id="beginning">go to beginning</button>
<button id="rewind">rewind</button>
<button id="play">play</button>
<button id="stop">stop</button>
<button id="forward">fast forward</button>
<button id="end">go to end</button>
<input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
<span id="repeat">
<input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
<input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
<input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
</span>
</span>
</div><!-- End demo -->
<div class="demo-description">
<p>
A mediaplayer toolbar. Take a look at the underlying markup: A few button elements,
an input of type checkbox for the Shuffle button, and three inputs of type radio for the Repeat options.
</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/toolbar.html | HTML | art | 2,665 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="radio.html">Radios</a></li>
<li><a href="checkbox.html">Checkboxes</a></li>
<li><a href="icons.html">Icons</a></li>
<li><a href="toolbar.html">Toolbar</a></li>
<li><a href="splitbutton.html">Split Button</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/index.html | HTML | art | 563 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Icons</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( ".demo button:first" ).button({
icons: {
primary: "ui-icon-locked"
},
text: false
}).next().button({
icons: {
primary: "ui-icon-locked"
}
}).next().button({
icons: {
primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s"
}
}).next().button({
icons: {
primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s"
},
text: false
});
});
</script>
</head>
<body>
<div class="demo">
<button>Button with icon only</button>
<button>Button with icon on the left</button>
<button>Button with two icons</button>
<button>Button with two icons and no text</button>
</div><!-- End demo -->
<div class="demo-description">
<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/icons.html | HTML | art | 1,470 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Radios</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#radio" ).buttonset();
});
</script>
</head>
<body>
<div class="demo">
<form>
<div id="radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
</form>
</div><!-- End demo -->
<div class="demo-description">
<p>A set of three radio buttons transformed into a button set.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/radio.html | HTML | art | 1,029 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "input:submit, a, button", ".demo" ).button();
$( "a", ".demo" ).click(function() { return false; });
});
</script>
</head>
<body>
<div class="demo">
<button>A button element</button>
<input type="submit" value="A submit button"/>
<a href="#">An anchor</a>
</div><!-- End demo -->
<div class="demo-description">
<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/default.html | HTML | art | 966 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Checkboxes</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#check" ).button();
$( "#format" ).buttonset();
});
</script>
<style>
#format { margin-top: 2em; }
</style>
</head>
<body>
<div class="demo">
<input type="checkbox" id="check" /><label for="check">Toggle</label>
<div id="format">
<input type="checkbox" id="check1" /><label for="check1">B</label>
<input type="checkbox" id="check2" /><label for="check2">I</label>
<input type="checkbox" id="check3" /><label for="check3">U</label>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>A checkbox is styled as a toggle button with the button widget. The label element associated with the checkbox is used for the button text.</p>
<p>This demo also demonstrates three checkboxes styled as a button set by calling <code>.buttonset()</code> on a common container.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/checkbox.html | HTML | art | 1,307 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Split button</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#rerun" )
.button()
.click(function() {
alert( "Running the last action" );
})
.next()
.button( {
text: false,
icons: {
primary: "ui-icon-triangle-1-s"
}
})
.click(function() {
alert( "Could display a menu to select an action" );
})
.parent()
.buttonset();
});
</script>
<style>
</style>
</head>
<body>
<div class="demo">
<div>
<button id="rerun">Run last action</button>
<button id="select">Select an action</button>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>An example of a split button built with two buttons: A plan button with just text, one with only a primary icon and no text. Both are grouped together in a set.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/button/splitbutton.html | HTML | art | 1,247 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="animated.html">Animated</a></li>
<li><a href="resize.html">Resizable progressbar</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/progressbar/index.html | HTML | art | 439 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Animated</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.progressbar.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.ui-progressbar-value { background-image: url(images/pbar-ani.gif); }
</style>
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: 59
});
});
</script>
</head>
<body>
<div class="demo">
<div id="progressbar"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>
This progressbar has an animated fill by setting the
<code>background-image</code>
on the
<code>.ui-progressbar-value</code>
element, using css.
</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/progressbar/animated.html | HTML | art | 956 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Resizable</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.progressbar.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: 37
});
$( "#progressbarWrapper" ).resizable();
});
</script>
</head>
<body>
<div class="demo">
<div id="progressbarWrapper" style="height:30px; " class="ui-widget-default">
<div id="progressbar" style="height:100%;"></div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>The progress bar's widths are specified in percentages for flexible sizing so it will resize to fit its container. Try resizing the height and width of this bar to see how it maintains the correct proportions. (This is not necessarily a real-world example, but it's a good illustration of how flexibly all the plugins are coded.)</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/progressbar/resize.html | HTML | art | 1,309 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.progressbar.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: 37
});
});
</script>
</head>
<body>
<div class="demo">
<div id="progressbar"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>Default determinate progress bar.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/progressbar/default.html | HTML | art | 766 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Accordion Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="fillspace.html">Fill space</a></li>
<li><a href="no-auto-height.html">No auto height</a></li>
<li><a href="collapsible.html">Collapse content</a></li>
<li><a href="mouseover.html">Open on mouseover</a></li>
<li><a href="hoverintent.html">Open on hoverintent</a></li>
<li><a href="custom-icons.html">Customize icons</a></li>
<li><a href="sortable.html">Sortable</a></li>
</ul>
</div>
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/accordion/index.html | HTML | art | 727 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Accordion - No auto height</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#accordion" ).accordion({
autoHeight: false,
navigation: true
});
});
</script>
</head>
<body>
<div class="demo">
<div id="accordion">
<h3><a href="#section1">Section 1</a></h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div>
<h3><a href="#section2">Section 2</a></h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3><a href="#section3">Section 3</a></h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
<a href="#othercontent">Link to other content</a>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Setting <code>autoHeight: false</code> allows to accordion panels to keep their native height.</p>
<p>In addition, the <code>navigation</code> option is enabled, opening the panel based on the current location, eg. no-auto-height.html#panel2 would open the second panel on page load. It also finds anchors within the content, so #othercontent will open the third section, as it contains a link with that href.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/accordion/no-auto-height.html | HTML | art | 2,278 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Accordion - Collapse content</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#accordion" ).accordion({
collapsible: true
});
});
</script>
</head>
<body>
<div class="demo">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>By default, accordions always keep one section open. To allow for all sections to be be collapsible, set the <code>collapsible</code> option to true. Click on the currently open section to collapse its content pane.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/accordion/collapsible.html | HTML | art | 2,512 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Accordion - Fill space</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#accordion" ).accordion({
fillSpace: true
});
});
$(function() {
$( "#accordionResizer" ).resizable({
minHeight: 140,
resize: function() {
$( "#accordion" ).accordion( "resize" );
}
});
});
</script>
</head>
<body>
<div class="demo">
<h3 class="docs">Resize the outer container:</h3>
<div id="accordionResizer" style="padding:10px; width:350px; height:220px;" class="ui-widget-content">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div>
</div>
<span class="ui-icon ui-icon-grip-dotted-horizontal" style="margin:2px auto;"></span>
</div><!-- End accordionResizer -->
<div style="margin-top:7px; padding:10px; width:350px; height:50px;" class="ui-widget-content">I'm another panel</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Because the accordion is comprised of block-level elements, by default its width fills the available horizontal space. To fill the vertical space allocated by its container, set the boolean <code>fillSpace</code> option to true, and the script will automatically set the dimensions of the accordion to the height of its parent container. The accordion will also resize with its container if the container is <code>resizable</code>.</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/accordion/fillspace.html | HTML | art | 3,389 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Accordion - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
</head>
<body>
<div class="demo">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.
</p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
mauris vel est.
</p>
<p>
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos.
</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>
Click headers to expand/collapse content that is broken into logical sections, much like tabs.
Optionally, toggle sections open/closed on mouseover.
</p>
<p>
The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is
usable without JavaScript.
</p>
</div><!-- End demo-description -->
</body>
</html>
| zzh-simple-hr | ZJs/webapp/jquery-ui/1.8.15/development-bundle/demos/accordion/default.html | HTML | art | 2,612 |