首页 > 其他分享 >jQuery插件(jQuery-UI(Accordion:手风琴/Autocomplete:自动搜索匹配/Tabs:选项卡))

jQuery插件(jQuery-UI(Accordion:手风琴/Autocomplete:自动搜索匹配/Tabs:选项卡))

时间:2023-01-18 03:33:06浏览次数:63  
标签:jQuery ipsum 插件 选项卡 Accordion Tabs amet

视频

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>测试jQuery-UI的基本使用</title>
  <link rel="stylesheet" href="jquery-ui.css">
</head>
<body>

<!--1. Accordion: 手风琴效果-->
<h2>1. Accordion: 手风琴效果</h2>
<div id="accordion">
  <h3>First</h3>
  <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
  <h3>Second</h3>
  <div>Phasellus mattis tincidunt nibh.</div>
  <h3>Third</h3>
  <div>Nam dui erat, auctor a, dignissim quis.</div>
</div>

<!-- 2. Autocomplete: 自动完成搜索输入框 -->
<h2>2. Autocomplete: 自动完成搜索输入框</h2>
<div>
  <input id="autocomplete" title="type &quot;a&quot;">
</div>

<!--3. Tabs: 选项卡-->
<h2>3. Tabs: 选项卡</h2>
<div id="tabs">
  <ul>
    <li><a href="#tabs-1">First</a></li>
    <li><a href="#tabs-2">Second</a></li>
    <li><a href="#tabs-3">Third</a></li>
  </ul>
  <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
  <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div>
  <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div>
</div>


<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script type="text/javascript">

  // 1. Accordion: 手风琴效果
  $('#accordion').accordion()

  // 2. Autocomplete: 自动完成搜索输入框
  var availableTags = [
    "ActionScript",
    "AppleScript",
    "Asp",
    "BASIC",
    "C",
    "C++",
    "Clojure",
    "COBOL",
    "ColdFusion",
    "Erlang",
    "Fortran",
    "Groovy",
    "Haskell",
    "Java",
    "JavaScript",
    "Lisp",
    "Perl",
    "PHP",
    "Python",
    "Ruby",
    "Scala",
    "Scheme"
  ]
  $( "#autocomplete" ).autocomplete({
    source: availableTags
  })

  // 3. Tabs: 选项卡
  $('#tabs').tabs()
</script>

</body>
</html>

标签:jQuery,ipsum,插件,选项卡,Accordion,Tabs,amet
From: https://www.cnblogs.com/chuixulvcao/p/17059060.html

相关文章

  • jQuery插件(jQuery validation)
    视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><style>.error{color:#F00;}</style></hea......
  • IntelliJ插件笔记(二) 运行插件---添加Actions
    本文内容主要流程按照官网手册展开,也是较为准确的翻译。原文可见:CreatingActions|IntelliJPlatformPluginSDK(jetbrains.com)Actions插件可以在IDE的菜单或者工具......
  • maven flatten-maven-plugin 插件简单说明
    mavenflatten-maven-plugin是一个比较有意思的项目,核心是对于我们发布的包提供一些简洁清晰的使用,去除掉哪些没用的(比如父pom信息,profile信息。。。)参考使用maven......
  • jQuery(window.onload与$(document).ready())
    视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>window.onload与$(document).ready()</title></head><body><h1>测试window.onload......
  • jQuery多库共存
    视频<!DOCTYPEhtml><html><head><metacharset="UTF-8"><title>26_多库共存</title><styletype="text/css">*{margin:0px;}.div1......
  • React:开发者工具谷歌插件下载安装
    React:开发者工具谷歌插件最近学习前端react主要是想大概浏览一下,这里提供尚硅谷的是视屏资料中的谷歌插件的下载。(如有侵权联系删除)这里提供我的下载地址,其中除了插件,还有......
  • jQuery(自定义动画/导航动态显示效果)
    视频自定义动画<!DOCTYPEhtml><html><head><metacharset="UTF-8"><title>24_自定义动画</title><styletype="text/css">*{margin:0px;......
  • Kong网关安装自定义插件
    安装自定义插件需要注意kong网关的版本要求!! 下面以安装Skywalking插件为例,要求Kong网关是2.2及以上版本,https://github.com/apache/skywalking-kong一、下载Skywalking......
  • 生成二维码插件&用法
        1)vue-qrcode:     git地址:https://github.com/fengyuanchen/vue-qrcode     用法:        安装依赖:npminstallqrcode......
  • 前端打印插件jqprint的使用
    1、下载地址https://webscripts.softpedia.com/script/Modules/jQuery-Plugins/jqPrint-68448.html2、使用jqprint必须在使用引用插件之前加上jquery-migrate-1.2.1.min.j......