Drop Effect
说明:drop 效果隐藏或显示元素淡入/淡出并在一个方向上滑动。
-
drop
-
direction(默认:
"left"
)类型:String元素下落以隐藏元素的方向,或元素将被显示的方向。
可能的值:
up
、down
、left
、right
。
-
例子:
使用拖放效果切换 div。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>drop demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<style>
#toggle {
width: 100px;
height: 100px;
background: #ccc;
}
</style>
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<p>Click anywhere to toggle the box.</p>
<div id="toggle"></div>
<script>
$( document ).click(function() {
$( "#toggle" ).toggle( "drop" );
});
</script>
</body>
</html>
演示:
相关用法
- JQuery UI Droppable tolerance用法及代码示例
- JQuery UI Droppable scope用法及代码示例
- JQuery UI Droppable classes用法及代码示例
- JQuery UI Droppable hoverClass用法及代码示例
- JQuery UI Droppable greedy用法及代码示例
- JQuery UI Droppable drop( event, ui )用法及代码示例
- JQuery UI Droppable activeClass用法及代码示例
- JQuery UI Droppable activate( event, ui )用法及代码示例
- JQuery UI Droppable over( event, ui )用法及代码示例
- JQuery UI Droppable disable用法及代码示例
- JQuery UI Droppable instance用法及代码示例
- JQuery UI Droppable deactivate( event, ui )用法及代码示例
- JQuery UI Droppable create( event, ui )用法及代码示例
- JQuery UI Droppable widget用法及代码示例
- JQuery UI Droppable accept用法及代码示例
- JQuery UI Droppable enable用法及代码示例
- JQuery UI Droppable option用法及代码示例
- JQuery UI Droppable out( event, ui )用法及代码示例
- JQuery UI Droppable destroy用法及代码示例
- JQuery UI Droppable addClasses用法及代码示例
- JQuery UI Droppable disabled用法及代码示例
- JQuery UI Draggable snapMode用法及代码示例
- JQuery UI Draggable snap用法及代码示例
- JQuery UI Draggable start( event, ui )用法及代码示例
- JQuery UI Draggable cursorAt用法及代码示例
注:本文由纯净天空筛选整理自jqueryui.com大神的英文原创作品 Drop效果。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。