色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

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

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

各種互動(dòng)效果:
手風(fēng)琴式的折疊菜單(accordions)、日歷(date pickers)、對(duì)話框(dialogs)、滑動(dòng)條(sliders)、表格排序(table sorters)、頁(yè)簽(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)說(shuō)明: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)說(shuō)明: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)說(shuō)明: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)說(shuō)明: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)說(shuō)明: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(){
    $("#example").accordion();
});
CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說(shuō)明:http://docs.jquery.com/UI/Accordion/accordion#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/accordion/?p=1.1.1
2.2 dialogs 對(duì)話框
所需要的文件:
jquery.dimensions.js
ui.dialog.js
ui.resizable.js
ui.mouse.js
ui.draggable.js

用法:
$(document).ready(function(){
    $("#example").dialog();
});
CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說(shuō)明:http://docs.jquery.com/UI/Dialog/dialog#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/tests/dialog.html

2.3 sliders 滑動(dòng)條
所需要的文件
jquery.dimensions.js
ui.mouse.js
ui.slider.js

用法:
$(document).ready(function(){
    $("#example").slider();
});

CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說(shuō)明:http://docs.jquery.com/UI/Slider/slider#options
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.slider.html

2.4 Tablesorter表格排序
所需要的文件
ui.tablesorter.js

用法:
$(document).ready(function(){
    $("#example").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});
});

CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說(shuō)明:http://docs.jquery.com/Plugins/Tablesorter/tablesorter#options
選項(xiàng)實(shí)例:http://tablesorter.com/docs/#Demo

2.5 tabs頁(yè)簽(對(duì)IE支持不是很好)
所需要的文件
ui.tabs.js
用法:
$(document).ready(function(){
    $("#example > ul").tabs();
});
CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說(shuō)明:http://docs.jquery.com/UI/Tabs/tabs#initialoptions
選項(xiàng)實(shí)例:http://dev.jquery.com/view/trunk/plugins/ui/tests/tabs.html
tabs ext http://stilbuero.de/jquery/tabs_3/rotate.html

第三部分:效果
3.1 Shadow 陰影
實(shí)例http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.shadow.html
3.2 Magnifier 放大
實(shí)例http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.magnifier.html

JavaScript技術(shù)各種效果的jquery ui(接口)介紹,轉(zhuǎn)載需保留來(lái)源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 广丰县| 玛纳斯县| 威信县| 恩施市| 和林格尔县| 和林格尔县| 霍林郭勒市| 秀山| 巴林右旗| 汝州市| 营山县| 罗甸县| 巩留县| 鲁甸县| 文水县| 江安县| 郓城县| 九台市| 安塞县| 绥宁县| 榆树市| 阿坝县| 连云港市| 深圳市| 岢岚县| 尼木县| 凌海市| 中方县| 德钦县| 邳州市| 明光市| 珲春市| 隆林| 广西| 拜城县| 邵东县| 武宁县| 奇台县| 岳阳县| 洛川县| 乳山市|