最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

 更新時(shí)間:2008年09月17日 00:24:30   作者:  
使用jquery的朋友不得不看的,jquery ui接口,提升jquery的效率

基本的鼠標(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(){
    $("#example").accordion();
});
CSS文件:http://dev.jquery.com/view/trunk/themes/flora/flora.all.css
選項(xiàng)說明: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)說明: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)說明: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)說明:http://docs.jquery.com/Plugins/Tablesorter/tablesorter#options
選項(xiàng)實(shí)例:http://tablesorter.com/docs/#Demo

2.5 tabs頁簽(對(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)說明: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

相關(guān)文章

最新評(píng)論

临汾市| 扎兰屯市| 武邑县| 泰和县| 公主岭市| 东港市| 公主岭市| 阳山县| 太仆寺旗| 封开县| 昌宁县| 娄底市| 马龙县| 任丘市| 扎兰屯市| 新建县| 山东省| 淅川县| 玉林市| 大渡口区| 长顺县| 甘谷县| 杭锦后旗| 鞍山市| 民和| 岳池县| 什邡市| 温州市| 女性| 元阳县| 德州市| 静海县| 喜德县| 同江市| 遂宁市| 丰宁| 错那县| 土默特左旗| 襄城县| 修文县| 思南县|