<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>1</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="../css/mui.min.css">
<style>
html,
body,
.mui-bar,
.mui-content {
background-color: #FFFFFF;
}
.distance {
margin-left: 5em;
}
.title-style {
width: 8em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ul-unit li {
width: calc(100% / 4);
height: 100%;
padding: 0.5em 0;
text-align: center;
border-right: 1px solid #97C8FF;
font-size: 0.8em;
color: #1A1A1A;
}
.ul-unit {
margin-top: 2em;
list-style: none;
display: flex;
margin: 0 auto;
padding: 0;
justify-content: space-around;
width: 100%;
border: 1px solid #97C8FF;
border-radius: 2em;
}
ul li.active {
color: #2E91FF;
background: #97C8FF;
}
ul li:first-of-type.active {
border-radius: 2em 0 0 2em;
}
ul li:last-of-type {
border-right: none;
}
ul li:last-of-type.active {
border-radius: 0 2em 2em 0;
}
.mui-table-view {
margin-top: 10%;
}
.mui-bar-nav {
box-shadow: none;
}
/* */
.mui-active {
color: #2E91FF;
background: #97C8FF;
}
.ul1 li{
height: 40px;
}
/* */
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<h1 class="mui-title">2</h1>
</header>
<div class="mui-content mui-content-padded">
<ul class="ul-unit">
<li num="0" class="active">1</li>
<li num="1">2</li>
<li num="2">3</li>
<li num="3">4</li>
</ul>
<ul class="mui-table-view " id="connectLiList">
</ul>
<!-- ------------------- -->
<ul class="ul1">
<li num="0" class="mui-active">2</li>
<li num="1" class="">1</li>
<li num="2" class="">2</li>
<li num="3" class="">3</li>
</ul>
<div id="connectLiList1"></div>
<!-- ------------------- -->
</div>
</body>
<script src="../js/mui.min.js"></script>
<script>
var ulUtil = document.querySelector(".ul-unit");
var libox = ulUtil.querySelectorAll('li');
mui('.ul-unit').on('tap', 'li', function(ret) {
ulUtil.querySelector("li.active").classList.remove("active");
this.classList.add("active");
var num = this.getAttribute('num');
console.log(num);
document.querySelector('#connectLiList').innerHTML = html2;
})
var ul1 = document.querySelector(".ul1");
mui('.ul1').on('tap', 'li', function(ret) {
ul1.querySelector("li.mui-active").classList.remove("mui-active");
this.classList.add("mui-active");
var num = this.getAttribute('num');
console.log(num);
document.querySelector('#connectLiList1').innerHTML = 123;
})
</script>
</html>