以下运行结果:

代码如下:

<!DOCTYPE html>
<html><head><meta charset="utf-8" /><title></title><link rel="stylesheet" type="text/css" href="css/css.css"/><style type="text/css">*{margin:auto;font-family:"Hiragino Sans GB", "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;}
input:focus {outline:none;}
a{text-decoration:none;cursor:pointer;}
ul,ol,dt,li{list-style:none;margin:0px;padding:0px;}
i,em{text-decoration:none;}
@font-face {font-family:'iconfont';  /* project id 732843 */src:url('//at.alicdn.com/t/font_732843_rucp0yk4ovs.eot');src:url('//at.alicdn.com/t/font_732843_rucp0yk4ovs.eot?#iefix') format('embedded-opentype'),url('//at.alicdn.com/t/font_732843_rucp0yk4ovs.woff') format('woff'),url('//at.alicdn.com/t/font_732843_rucp0yk4ovs.ttf') format('truetype'),url('//at.alicdn.com/t/font_732843_rucp0yk4ovs.svg#iconfont') format('svg');
}
.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale;
}
.sch-list{width:900px;height:auto;border:1px solid #EEE;border-radius:2px;}
.sch-list ul{overflow:hidden;width:900px;height:auto;overflow:hidden;}
.sch-list ul li{float:left;margin-top:30px; width:900px;height:170px;border-bottom:1px solid #eee;}
.sch-list ul li:last-child{border-bottom:none;}
.list-logo{float:left;margin-left:20px; padding:7px;box-sizing:border-box; width:140px;height:140px;border:1px solid #E8E8E8;border-radius:2px;}
.list-logo img{width:126px;height:126px;}
.list-logo img:hover{opacity:0.6;filter:alpha(opacity=60);}
.list-matter{float:left; margin-left:20px;width:680px;height:auto;}
.list-matter h3{font-size:18px;color:#333; margin-bottom:10px;}
.list-matter h3:hover{color:#1184E1;}
.sch-district{float:left;font-size:12px;color:#999;line-height:12px;width:483px;text-overflow:ellipsis;white-space:nowrap;
overflow:hidden;}
.icont{width:680px;clear:both;}
.district{float:left;margin:1px 5px 0 0; color:#1fcabb;font-size:16px;}
.list-matter span{float:left;margin:15px 20px 0 0; font-size:12px;color:#333;display:block;}
.course{float:left;margin:1px 5px 0 0; color:#ec2480;font-size:16px;}
.evaluate{float:left;margin:1px 5px 0 0; color:#eea819;font-size:16px;}
.list-matter .tel{float:right;margin:5px;font-size:16px;}
.chat{float:left;margin:0px 6px 0 0; color:#bfebd4;font-size:20px;}
.consult{clear:both; margin-top:46px;font-size:12px;line-height:12px;color:#999;}
.stu-evaluate{margin-top:6px;padding:3px 0 3px 4px;box-sizing:border-box; width:698px;height:24px;border:1px solid #E8E8E8;
font-size:12px;color:#666;line-height:18px;}
.stu-tit{float:left;width:72px;height:18px;font-weight:bold;}
.line{float:left;margin:3px 4px 0 4px;width:1px;height:12px;background:#E8E8E8;}
.stu-matter{margin-top:2px; width:600px;height:18px;}
.stu-matter:hover{color:#1184E1;cursor:pointer;}</style></head><body><div class="sch-list"><ul><li><div class="list-logo"><a><img src="img/lg.png"/></a></div><div class="list-matter"><h3><a>青鸟IT汇</a></h3><p class="sch-district">微信关注公众号:青鸟IT汇,更多精彩竟在里面,java人脸识别,活体检测,张张嘴眨眨眼源码,js以及jar包应有尽有。还有C#实现指纹识别登陆,人脸识别等!欢迎关注!</p><div class="icont"><span><i class="iconfont district">&#xe65d;</i>java人脸识别</span><span><i class="iconfont course">&#xe65f;</i>微信公众号</span><span><i class="iconfont evaluate">&#xe65e;</i>人工智能</span><span class="tel"><i class="iconfont chat">&#xe65c;</i>400-601-2788转3453</span></div><p class="consult">青鸟IT汇</p><div class="stu-evaluate"><div class="stu-tit">学员真实评价</div><div class="line"></div><p class="stu-matter sch-district">学习学科英语培训课程:教学环境干净、舒适。也有专门的绘本区供孩子借阅:。交通很方便,距离家也比较近距离家也比较近                                </p></div></div></li><li><div class="list-logo"><a><img src="img/lg.png"/></a></div><div class="list-matter"><h3><a>青鸟IT汇</a></h3><p class="sch-district">微信关注公众号:青鸟IT汇,更多精彩竟在里面,java人脸识别,活体检测,张张嘴眨眨眼源码,js以及jar包应有尽有。还有C#实现指纹识别登陆,人脸识别等!欢迎关注!</p><div class="icont"><span><i class="iconfont district">&#xe65d;</i>java人脸识别</span><span><i class="iconfont course">&#xe65f;</i>微信公众号</span><span><i class="iconfont evaluate">&#xe65e;</i>人工智能</span><span class="tel"><i class="iconfont chat">&#xe65c;</i>400-601-2788转3453</span></div><p class="consult">青鸟IT汇</p><div class="stu-evaluate"></div></div></li><li><div class="list-logo"><a><img src="img/lg.png"/></a></div><div class="list-matter"><h3><a>青鸟IT汇</a></h3><p class="sch-district">微信关注公众号:青鸟IT汇,更多精彩竟在里面,java人脸识别,活体检测,张张嘴眨眨眼源码,js以及jar包应有尽有。还有C#实现指纹识别登陆,人脸识别等!欢迎关注!</p><div class="icont"><span><i class="iconfont district">&#xe65d;</i>java人脸识别</span><span><i class="iconfont course">&#xe65f;</i>微信公众号</span><span><i class="iconfont evaluate">&#xe65e;</i>人工智能</span><span class="tel"><i class="iconfont chat">&#xe65c;</i>400-601-2788转3453</span></div><p class="consult">青鸟IT汇</p><div class="stu-evaluate"></div></div></li></ul></div><script type="text/javascript">$(document).ready(function() {$(".stu-evaluate").each(function() {var values_stu_evaluate = ($(this).text());if(/^\s*?$/.test(values_stu_evaluate)) {//如果是空的$(this).prev("p").css("margin-top", "75px");$(this).css("border","0px");} else {}});
});</script></body>
</html>

jQuery遍历div,判断是否为空,为空时执行某个操作相关推荐

  1. Android ThreadUtil 线程公共类,判断是否在主线程/ 子线程执行 相关操作

    前言:通常,我们写的公共的模块给别人用,但是这个模块又必须在特定的线程中执行. 比如,一个加载网络图片的的方法,需要在子线程中执行. /** * 加载网络图片 */ private void load ...

  2. jquery判断元素内容是否为空的方法

    用jquery获取元素内容需要分两个情况: input 用val(); var value = $('#test').val(); 是否为空的判断方法: if(value.length == 0){} ...

  3. jQuery循环遍历div,并且获取内容

    var divbox = $(".checkbox.active"); $.each(divbox,function (index,don){     analysistypes. ...

  4. div.php织梦自定义表判断不能为空,织梦使用if判断某个字段是否为空

    织梦如何使用if判断某个字段是否为空呢?我们以文章页调用文章摘要为例: 使用if语句判断摘要是否为空,如果有摘要就显示摘要模块,如果没有就不显示 {dede:field.description run ...

  5. jQuery 遍历方法总结

    遍历方法有:1.add(),用于把元素添加到匹配元素的集合中:2.children(),用于返回被选元素的所有直接子元素:3.closest(),用于返回被选元素的第一个祖先元素:4.contents ...

  6. jQuery遍历之next()、nextAll()方法使用实例

    jquery遍历:next()和nextAll()方法.实例如下: 复制代码 代码如下: <html> <head> <script type="text/ja ...

  7. jquery遍历集合数组标签

    jquery遍历集合&数组的两种方式 CreateTime--2017年4月24日08:31:49 Author:Marydon 方法一: $(function(){$("input ...

  8. jquery遍历多个li_21个jQuery遍历节点方法详解

    本篇教程介绍了21个jQuery遍历节点方法详解,希望阅读本篇文章以后大家有所收获,帮助大家对jQuery的理解更加深入. < 1.children()方法:$('div').children( ...

  9. jquery遍历json与数组方法总结each()

    在jquery中遍历数组或json数组我们使用最多的方法是each这个函数了或使用foreach,for也是可以实现的,下面我来给大家详细介绍jquery遍历json与数组实现. 代码如下复制代码 先 ...

最新文章

  1. mysql与java的计算效率_java mysql数据库查询效率问题
  2. 每日一笑 | 马冬梅当上了百度投资董事???
  3. ❤️JavaScript系列6部曲:流程控制(万字长文)❤️
  4. python默认参数陷阱_python默认参数陷阱
  5. oracle更改编码
  6. Python-Pandas之两个Dataframe的差异比较
  7. 解决 sessionStroage 无法在多个标签页共享数据的问题
  8. Erlang打包工具rebar安装使用
  9. 低解密指数攻击_CTF中RSA的一些攻击思路
  10. Java并发面试,幸亏有点道行,不然又被忽悠了 1
  11. 给小米手机安装google框架
  12. su灯光插件_V-Ray for SketchUp渲染外部照明快速入门
  13. Linux系统中解决Device eth0 does not seem to be present,delaying initialization问题
  14. 误差条图各部分的代表意思_【小强视界】混凝土搅拌站计量误差原因分析及控制措施...
  15. 2022-2027年中国吉他行业市场调研及未来发展趋势预测报告
  16. PHP在线发信投稿系统网站程序
  17. 【spine】制作游戏中人物动作(战斗、倒地、移动等操作等)动画的一个完整流程
  18. 调用ibm mq_在IBM OpenWhisk中提供和调用动作的简便方法
  19. 双重差分模型python包_开学礼包:如何使用双重差分法的交叉项(迄今最全攻略)...
  20. 产品设计思维导图模板

热门文章

  1. 最优间隔分类器-SVM
  2. Dubbo 常见服务治理策略
  3. 【THUSC 2017】如果奇迹有颜色【polya引理】【矩阵】【计数dp】【BM打表+线性递推】
  4. LuoguP5366 [SNOI2017]遗失的答案
  5. Codeforces Round #738 (Div. 2)
  6. P3803 【模板】多项式乘法(FFT)
  7. 牛客题霸 [ 有重复项数字的所有排列] C++题解/答案
  8. 洛谷 P1903 [国家集训队]数颜色 / 维护队列
  9. bzoj3729-Gty的游戏【Splay,博弈论】
  10. P3704-[SDOI2017]数字表格【莫比乌斯反演】