摘要: 按年龄大小排序的例子 按年龄从大到小排序 阅读全文
posted @ 2015-08-27 10:19 yugl 阅读(283) 评论(0) 推荐(0)
摘要: 1.扩展属性对象var opts = $.extend(defaults, options); 2.可重写对象新属性for(var v in options){ if(v){ this[v]=options[v]; }; }; 阅读全文
posted @ 2015-08-24 17:55 yugl 阅读(169) 评论(0) 推荐(0)
摘要: 昨个项目中遇到的问题,想获取指定td在该行tr中可见列的索引;由于改行tr下有隐藏元素,取索引的时候直接用$(['td[name="operation"]').index()取到的值肯定是不正确的;查了一下资料,复习了下index([selector|element])的用法。现举例结合实际分享下。... 阅读全文
posted @ 2014-11-26 10:33 yugl 阅读(1042) 评论(0) 推荐(0)
摘要: 背景:页面默认显示为图1,当子元素B的内容很多时,显示为图2,且1跟2的布局方式均为右对齐图1图2css样式:.clearfix:after {content: ".";display: block;height: 0;font-size: 0;clear: both;visibility: hid... 阅读全文
posted @ 2014-11-21 15:48 yugl 阅读(299) 评论(0) 推荐(0)
摘要: text-overflow: ellipsis;该属性用于定义文本溢出的显示方式css代码:.textEllipsis { overflow: hidden !important; white-space: nowrap !important; text-overflow: ell... 阅读全文
posted @ 2014-11-21 15:36 yugl 阅读(3614) 评论(0) 推荐(0)