码迷,mamicode.com
首页 > Web开发 > 详细

jquery实现light7的开关按钮的代码

时间:2016-03-20 11:49:05      阅读:668      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>我的生活</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/favicon.ico">
<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/light7.min.css">
<link rel="stylesheet" href="css/light7-swiper.min.css">
<script type=‘text/javascript‘ src=‘js/jquery.js‘ charset=‘utf-8‘></script>
</head>
<body>
<!-- 你的html代码 -->
<div class="page">
<header class="bar bar-nav">
<a class="button button-link button-nav pull-left" href="/demos/card" data-transition=‘slide-out‘>
<span class="icon icon-left"></span>
返回
</a>
<h1 class="title">我的生活</h1>
</header>
<div class="content">
<div class="list-block">
<ul><li>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<label class="label-switch">
<input id="inpu" type="checkbox">
<div id="che1" class="checkbox"></div>
</label>
</div>
</div>
</div>
</li></ul>
</div><!--list-block-->
<div class="content-block">
<h1 id="h11">我是h1</h1>
<h6 style="display: none" id="h66">我是话</h6>
        </div>
</div><!--content-->
</div>
<script>
$("#inpu").click(function(){
if(this.checked) {
$("#h11").hide();
$("#h66").show();
}else {
$("#h11").show();
$("#h66").hide();
}
})
</script>
<script type=‘text/javascript‘ src=‘js/light7.min.js‘ charset=‘utf-8‘></script>
<script type=‘text/javascript‘ src=‘js/light7-swiper.min.js‘ charset=‘utf-8‘></script>
</body>
</html>

jquery实现light7的开关按钮的代码

标签:

原文地址:http://www.cnblogs.com/myclovers/p/5297316.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!