さまざまなエフェクトを備えた jquery ui (インターフェイス) の紹介_jquery

WBOY
リリース: 2016-05-16 19:00:56
オリジナル
832 人が閲覧しました

基本的鼠标互动:
拖拽(drag and dropping)、排序(sorting)、选择(selecting)、缩放(resizing)

各种互动效果:
手风琴式的折叠菜单(accordions)、日历(date pickers)、对话框(dialogs)、滑动条(sliders)、表格排序(table sorters)、页签(tabs)、放大镜效果(magnifier)、阴影效果(shadow)

第一部分:鼠标交互
1.1 Draggables:拖拽
所需文件:
ui.mouse.js
ui.draggable.js
ui.draggable.ext.js

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

draggable(options)可以跟很多选项
选项说明:http://docs.jquery.com/UI/Draggables/draggable#options
选项实例: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("
Dropped!");
   }
});
});
选项说明:http://docs.jquery.com/UI/Droppables/droppable#options
选项实例: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
选项说明:http://docs.jquery.com/UI/Sortables/sortable#options
选项实例: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();
});
选项说明:http://docs.jquery.com/UI/Selectables/selectable#options
选项实例:http://dev.jquery.com/view/trunk/plugins/ui/tests/selectable.html

1.5 Resizables改变大小
所需要的文件 ,此例子需要几个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
选项说明:http://docs.jquery.com/UI/Resizables/resizable#options
选项实例:http://dev.jquery.com/view/trunk ... s/ui.resizable.html

第二部分:互动效果
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
选项说明:http://docs.jquery.com/UI/Accordion/accordion#options
选项实例:http://dev.jquery.com/view/trunk/plugins/accordion/?p=1.1.1
2.2 dialogs 对话框
所需要的文件:
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/主題/flora/flora.all.css
オプションの説明: http://docs.jquery.com/UI/Dialog/dialog# options
オプションの例: http://dev.jquery.com/view/trunk/plugins/ui/tests/dialog.html

2.3 スライダー スライダー
必要なファイル
jquery.dimensions.js
ui.mouse.js
ui.slider.js

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

CSS ファイル: http://dev.jquery.com/view/trunk/主題/flora/flora.all.css
オプションの説明: http://docs. jquery.com/UI/Slider/slider#options
オプションの例: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]], ウィジェット) : ['ゼブラ']});
});

CSS ファイル: http://dev.jquery.com/view/trunk/主題/flora/flora.all.css
オプションの説明: http://docs. jquery.com/Plugins/Tablesorter/tablesorter#options
オプションの例: http://tablesorter.com/docs/#Demo

2.5 タブ (IE サポートにはあまり適していません)
必要なファイル
ui.tabs.js
使用法:
$(document).ready(function(){
$( "#example > ul").tabs();
});
CSS ファイル: http://dev.jquery.com/view/trunk/主題/flora/ flora.all。 css
オプションの説明:http://docs.jquery.com/UI/Tabs/tabs#initialoptions
オプションの例:http:// dev.jquery. com/view/trunk/plugins/ui/tests/tabs.html
タブ拡張 http://stilbuero.de/jquery/tabs_3/rotate.html

パート 3: エフェクト
3.1 シャドウ シャドウ
http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.shadow.html
3.2 拡大鏡の増幅
http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.magnifier.html

関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!