各种效果的jquery ui(接口)介绍

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

各种效果的jquery ui(接口)介绍

  2020-05-12 我要评论

基本的鼠标互动:
拖拽(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:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Draggableshttps://img.qb5200.com/download-x/draggable
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/ui/testshttps://img.qb5200.com/download-x/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!");
   }
});
});
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Droppableshttps://img.qb5200.com/download-x/droppable
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/ui/testshttps://img.qb5200.com/download-x/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/projecthttps://img.qb5200.com/download-x/dimensions
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Sortables/sortable
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/uihttps://img.qb5200.com/download-x/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:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Selectables/selectable
选项实例:http:/https://img.qb5200.com/download-x/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:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Resizables/resizable
选项实例:http:/https://img.qb5200.com/download-x/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:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Accordion/accordion
选项实例:http:/https://img.qb5200.com/download-x/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:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Dialoghttps://img.qb5200.com/download-x/dialog
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/ui/testshttps://img.qb5200.com/download-x/dialog.html

2.3 sliders 滑动条
所需要的文件
jquery.dimensions.js
ui.mouse.js
ui.slider.js

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

CSS文件:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Slider/slider
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/uihttps://img.qb5200.com/download-x/demos/ui.slider.html

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

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

CSS文件:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/Plugins/Tablesorter/tablesorter
选项实例:http://tablesorter.comhttps://img.qb5200.com/download-x/docs/

2.5 tabs页签(对IE支持不是很好)
所需要的文件
ui.tabs.js
用法:
$(document).ready(function(){
    $("#example > ul").tabs();
});
CSS文件:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/themes/flora/flora.all.css
选项说明:http:/https://img.qb5200.com/download-x/docs.jquery.com/UI/Tabs/tabs
选项实例:http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/ui/tests/tabs.html
tabs ext http://stilbuero.de/jquery/tabs_3/rotate.html

第三部分:效果
3.1 Shadow 阴影
实例http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/uihttps://img.qb5200.com/download-x/demos/ui.shadow.html
3.2 Magnifier 放大
实例http:/https://img.qb5200.com/download-x/dev.jquery.com/view/trunk/plugins/uihttps://img.qb5200.com/download-x/demos/ui.magnifier.html

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们