码迷,mamicode.com
首页 >  
搜索关键字:selector    ( 3894个结果
JQuery日记_5.13 Sizzle选择器(六)选择器的效率
当选择表达式不符合快速匹配(id,tag,class)和原生QSA不可用或返回错误时,将调用select(selector, context, results, seed)方法,此方法迭代DOM选择、过滤元素, 在DOM树非常大的时候为了保证效率,应该保证html设计的合理,尽量使用可快速匹配(id,tag,class)的表达式,其次是QSA支持的选择器,尽量不要使用jquery扩展的selec...
分类:Web程序   时间:2014-05-15 05:22:20    阅读次数:327
JQuery获取对象标签类型
通过JQuery的selector,我们很容易的获取了对象。但是,如果想知道对象类型,进行不同的操作,该如何获取对象标签类型呢?$JQueryObject.prop("tagName");或者仅仅是判断类型$JQueryObject.is("TR");//如果是返回true,否则返回false。如果...
分类:Web程序   时间:2014-05-15 02:12:54    阅读次数:929
导航视图栏左右键自定义
//创建按钮初始化UIButton*leftButton=[[UIButtonalloc]initWithFrame:CGRectMake(0,0,60,24)];//添加返回方法[leftButtonaddTarget:selfaction:@selector(backMainViewController)forControlEvents:UIControlEventTouchUpInside];//设置字体颜色,状态[leftButtonsetTitleColor..
分类:其他好文   时间:2014-05-15 00:36:08    阅读次数:320
Sublime Text 3 c++编译环境配置
{ "cmd":["g++","${file}","-o","${file_path}/${file_base_name}"], "file_regex":"^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$", "working_dir":"${file_path}", "selector":"source.c,source.c++", "encoding":"cp936", "variants": [ { "name":"Run", "shell":true, "cmd":["st..
分类:编程语言   时间:2014-05-14 17:25:25    阅读次数:300
ios 数组排序
前几天写了个音乐播放器,添加了歌词播放功能,起初一直在考虑是否要用c语言的排序方法。没想到 oc 强大到早已做好了方法。简单又高大上。 [arrayNamesortUsingSelector:@selector(compare:)]; arrayName 是可变数组,compare: 是...
分类:移动开发   时间:2014-05-13 22:00:41    阅读次数:422
取消延时函数
- (void) networkReachabilityDidUpdate:(NetworkReachability*)reachability { [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(reachabilityChanged) object:nil]; ...
分类:其他好文   时间:2014-05-13 08:17:19    阅读次数:219
当filter使用函数而非选择器来过滤元素时的一个有趣的地方
JQuery官方API关于filter方法的介绍有这么一个实例: 也就是说除了常规的使用.filter(selector)的方式来过滤内容外,我们还可以使用.filter(function(index) { ....//判断语句,返回Boolean值})的方式来实现所需功能。需要了解的是这里的fun...
分类:其他好文   时间:2014-05-10 07:20:01    阅读次数:318
IOS中定时器NSTimer的开启与关闭
调用一次计时器方法:myTimer = [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(scrollTimer) userInfo:nil repeats:NO]; //不重复,只调用一次。tim....
分类:移动开发   时间:2014-05-09 08:50:29    阅读次数:473
JQuery_2.1.0_日记 5.8 Sizzle选择器(四)
Sizzle( selector, context, results, seed )的关键步骤 1,传入的context对应的context和当前document是否一致,不一致调用setDocument()重新设置document,用于frame的情况. 2,如果context为空修正context为document 3,selector如果不是字符串或者context不是Element或...
分类:Web程序   时间:2014-05-09 00:32:34    阅读次数:400
jquery closest方法
.closest( selector ) Description: For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tre...
分类:Web程序   时间:2014-05-07 15:07:34    阅读次数:380
3894条   上一页 1 ... 386 387 388 389 390 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!