Edit in JSRUN

console 命令行工具 X clear

                    
>
console
$('.dropdown').tendina({
	animate: true,
	speed: 200, //数值越小,展开速度越快
	openCallback: function($clickedEl) {
	  console.log($clickedEl);
	},
	closeCallback: function($clickedEl) {
	  console.log($clickedEl);
	}
  })
<ul class="dropdown tendina">
  <li class=""> <a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Menu 1</a>
    <ul style="display: none;">
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu 1</a></li>
    </ul>
  </li>
  <li class=""> <a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Menu 2</a>
    <ul style="display: none;">
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu 2</a></li>
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu 2</a></li>
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu w/ childrens</a>
        <ul style="display: none;">
          <li>Subsubmenu 2</li>
          <li>Subsubmenu 2</li>
        </ul>
      </li>
    </ul>
  </li>
  <li class="selected"> <a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Menu 3</a>
    <ul style="display: block;">
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu 3</a></li>
      <li><a href="http://ossweb-img.qq.com/images/chanpin/v2/public/jq_demo/html/Drop-down-menu.html#">Submenu 3</a></li>
    </ul>
  </li>
</ul>
* { margin:0; padding:0}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
	content: "";
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
* {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}
.dropdown {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 250px;
	background-color: #fff;
	font-family: "Microsoft Yahei", "SimSun", "Arial";
	padding-top: 20px;
	font-size: 12px;
}
.dropdown li {
	padding: 0 10px;
}
.dropdown li.selected {
	background-color: #f2f2f2;
}
.dropdown li a {
	display: block;
	width: 100%;
	padding: 10px;
	text-decoration: none;
	text-transform: uppercase;
	color: black;
}
.dropdown li > ul li {
	padding: 0 20px;
}
.dropdown li > ul li a {
	color: gray;
}
.dropdown li > ul li > ul li {
	padding: 10px 30px;
}

本项目引用的自定义外部资源