国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

各種效果的jquery ui(接口)介紹

2024-05-06 14:17:19
字體:
供稿:網(wǎng)友

基本的鼠標(biāo)互動(dòng):
拖拽(drag and dropping)、排序(sorting)、選擇(selecting)、縮放(resizing)

各種互動(dòng)效果:
手風(fēng)琴式的折疊菜單(accordions)、日歷(date pickers)、對(duì)話框(dialogs)、滑動(dòng)條(sliders)、表格排序(table sorters)、頁簽(tabs)、放大鏡效果(magnifier)、陰影效果(shadow)

第一部分:鼠標(biāo)交互
1.1 Draggables:拖拽
所需文件:
ui.mouse.js
ui.draggable.js
ui.draggable.ext.js

用法:文件載入后,可以拖拽class = "block"的層
$(document).ready(function(){
    $(".block").draggable();
});

draggable(options)可以跟很多選項(xiàng)
選項(xiàng)說明:http://docs.jquery.com/UI/Draggables/draggable#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/tests/draggable.html

1.2 Droppables
所需要文件,drag drop
ui.mouse.js
ui.draggable.js
ui.draggable.ext.js
ui.droppable.js
ui.droppable.ext.js
用法:
$(document).ready(function(){
    $(".block").draggable({helper: 'clone'});
$(".drop").droppable({
   accept: ".block",
   activeClass: 'droppable-active',
   hoverClass: 'droppable-hover',
   drop: function(ev, ui) {
       $(this).append("<br>Dropped!");
   }
});
});
選項(xiàng)說明:http://docs.jquery.com/UI/Droppables/droppable#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/tests/droppable.html

1.3 Sortables 排序
所需要的文件
jquery.dimensions.js
ui.mouse.js
ui.draggable.js
ui.droppable.js
ui.sortable.js
用法:
$(document).ready(function(){
    $("#myList").sortable({});
});
dimensions文檔http://jquery.com/plugins/project/dimensions
選項(xiàng)說明:http://docs.jquery.com/UI/Sortables/sortable#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.sortable.html

1.4 Selectables 選擇
所需要的文件
jquery.dimensions.js
ui.mouse.js
ui.draggable.js
ui.droppable.js
ui.selectable.js
用法:
$(document).ready(function(){
    $("#myList").selectable();
});
選項(xiàng)說明:http://docs.jquery.com/UI/Selectables/selectable#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/tests/selectable.html

1.5 Resizables改變大小
所需要的文件 ,此例子需要幾個(gè)css文件
jquery.dimensions.js
ui.mouse.js
ui.resizable.js
用法:
$(document).ready(function(){
    $("#example").resizable();
});
CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說明:http://docs.jquery.com/UI/Resizables/resizable#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk ... s/ui.resizable.html

第二部分:互動(dòng)效果
2.1 Accordion 折疊菜單
所需要的文件:
ui.accordion.js
jquery.dimensions.js
用法:
$(document).ready(function(){

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 元朗区| 巫溪县| 新余市| 井冈山市| 西畴县| 张北县| 策勒县| 泰兴市| 芜湖市| 巩留县| 额敏县| 霞浦县| 东海县| 永善县| 青州市| 中西区| 当涂县| 广德县| 新营市| 祁东县| 阿合奇县| 子长县| 禄劝| 定州市| 蒙城县| 舒兰市| 阿鲁科尔沁旗| 株洲市| 芦山县| 会东县| 沾化县| 海伦市| 宁蒗| 延寿县| 北宁市| 咸丰县| 保山市| 南木林县| 额济纳旗| 绥芬河市| 阿荣旗|