文档章节

JavaScript Selector Library Supports CSS4!

Chen-Zhiqiang
 Chen-Zhiqiang
发布于 2013/05/11 16:35
字数 199
阅读 33
收藏 0

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

I was reading DailyJS and ran across this great JavaScript selector library called Sel.

It can select elements using the very brand new CSS4 features. The following are some examples.

/* subject overriding, was '$div .box' in a previous CSS4 draft,
   returns 'div' rather than '.box' */ div! .box
  /* id references, 'input' who's ID matches 'label's 'for' attribute */ label /for/ input
  /* case insensitive attribute matching */ [attr = "val" i]   /* :nth-match and :nth-last-match to match against sub-selectors */ div:nth-match(3 of .box)   /* links who's target absolute URI matches the current document's URI,
   arguments specify the degree of locality */ a:local-link(0)   /* :column */ td:column(col.profit)   /* :nth-column and :nth-last-column */ td:nth-column(even)

I've been hopeful that a selector engine would take on the challenge of CSS4 support. From what I understand about jQuery, CSS4 support would require a lot of rewriting Sizzle since it is so highly dependent on querySelectorAll(). I know that NWMatcher is a lot more robust in it's pre- and post-processing of selectors even when the browser supports querySelectorAll(). In other words, I'm thinking a selector engine needs to know when the browser supports CSS4 and use querySelectorAll() if possible even when CSS4 is not supported.


本文转载自:http://kendsnyder.com/posts/javascript-selector-library-supports-css4

Chen-Zhiqiang

Chen-Zhiqiang

粉丝 11
博文 23
码字总数 22936
作品 0
苏州
程序员
私信 提问
Run Queries on Codebases with CodeQL

Author:w7ay@Knownsec 404 Team Time: November 20, 2019 Chinese version: https://paper.seebug.org/1078/ QL is an object-oriented query language used to retrieve data from relatio......

知道创宇404实验室
11/20
0
0
10+ Useful Javascript Libraries for Your New Proje

JavaScript Library is basically a pre-written scripting language that ease the development of JavaScript based applications such as AJAX and other web-centric technologies.These......

linjine
2015/05/05
70
0
websocket基础---stomp英文文档STOMP Over WebSocket

STOMP Over WebSocket What is STOMP? STOMP is a simple text-orientated messaging protocol. It defines an interoperable wire format so that any of the available STOMP clients can ......

spinachgit
2018/05/02
151
0
jQuery验证框架(一) 可选项 (jQuery validation)

jQuery验证框架 Html代码 <script type="text/javascript" src=js/jquery-1.3.2.min.js></script> <script type="text/javascript" src=js/jquery.validate.pack.js></script> <script type......

打杂
2010/11/16
14.3K
5
Raphaël 基于html5绘制web图形的javascript插件

昨天在群里看到一个海归妹子的个人兼应聘作品网站(http://www.wendyshijia.com),遂一时引起众狼骚动,里面的设计和创意都教人赞叹,如此简历让人大呼过瘾,同时作为前端开发工作的一员倍感压...

_EKC
2012/10/25
441
0

没有更多内容

加载失败,请刷新页面

加载更多

用于电话号码验证的综合正则表达式

我正在尝试综合使用正则表达式来验证电话号码。 理想情况下,它将处理国际格式,但必须处理美国格式,包括以下内容: 1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1(234)...

javail
37分钟前
6
0
你为什么要使用表达 >而不是Func ?

我了解lambda和Func和Action代表。 但是表情让我难过。 在什么情况下,您将使用Expression<Func<T>>而不是普通的旧Func<T> ? #1楼 我想添加一些关于Func<T>和Expression<Func<T>>之间的区别......

技术盛宴
53分钟前
5
0
用最简单的方法实现原生JS放大镜特效

<html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style> *{margin:0px;padding:0px;} #big{width:200p......

汤清丽
57分钟前
4
0
NIO 编程

1. NIO 比 传统 IO 有什么优点? 答:NIO 一个 线程 可以监听多个客户端,传统 客户端 -- 服务端模型中,一个线程监听一个客户端,导致线程消耗过多,一个线程要分配0.5M~1M内存。 2. NIO服务...

杨凯123
57分钟前
4
0
SpringBoot 系列教程自动配置选择生效

191214-SpringBoot 系列教程自动配置选择生效 写了这么久的 Spring 系列博文,发现了一个问题,之前所有的文章都是围绕的让一个东西生效;那么有没有反其道而行之的呢? 我们知道可以通过@Co...

小灰灰Blog
今天
9
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部