jquery实现tab切换效果
web jQuery 2021-10-10 1118 0
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6282342 2594 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)
打开边栏(ESC) 关闭边栏(ESC)
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<script src="js/jquery-2.1.0.min.js" type="text/javascript" charset="utf-8"></script>
		<title></title>
		<style type="text/css">
			.apply-record{
				width: 400px;
			}
			.apply-record .tab{
				height:60px;
				line-height:60px;				
			}
			.apply-record .tab .tab-item{
				list-style:none;
				display:inline-block;
				width:100px;
				text-align:center;
				font-size:20px;
			}
			.apply-record .tab .tab-item.active{
				color: #3F86FF;
				border-bottom: 3px solid #0000FF;
			}			
			.products .mainCont { 
				display: none; 
				width:100%;
				overflow: auto;
				text-align: center;
			} 
			.products .mainCont.selected {
				 display: block; 
			} 
		</style>
	</head>
	<body>
		<div class="apply-record">
			<ul class="tab">
				<li class="tab-item active">页面一</li>
				<li class="tab-item">页面二</li>
				<li class="tab-item">页面三</li>
			</ul>
			<div class="content products">
				<div class="mainCont selected">
					页面一
				</div>

				<div class="mainCont">
					页面二
				</div>
				
				<div class="mainCont">
					页面三
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		$(function() {
			$(".apply-record .tab .tab-item").click(function() {
				$(this).addClass("active").siblings().removeClass("active");
				$(".products .mainCont").eq($(this).index()).show().siblings().hide();
			})
		})
	</script>
</html>

版权声明:本篇文章来源于网络。 来源链接

相关推荐
jquery出现Uncaught TypeError: $(...).prop is not a function问题
jQuery | 2019-08-23 6263
做全选功能的时候用到 var xz = $(this).prop("checked"); 提示: Uncaught TypeError: $(...).prop is not a function 应该是jquery版本过低造成的,更换高版本成功解决问题, jquery下载地址 http://www...
TypeError: e.indexOf is not a function解决方法
jQuery | 2020-06-23 6233
This error might be caused by jquery event aliases like .load, .unload or .error deprecated since jQuery 1.8. Look for these aliases in your code and replace them with .o...
评论:0条
评论加载中...
发表评论