刚刚看了下jQuery的源代码,其中关于CSS及className的操作思想确实很不错,值得借鉴。
其中关于jQuery.className.has的定义部分,是用的正则来实现的,其实此处直接利用Javascript中String对象的indexOf方法来作处理的话,比用正则效率会更些,因此
[url=http://jquery.com/]http://jquery.com/[/url]
jQuery源码下载:[url=http://docs.jquery.com/Downloading_jQuery]http://docs.jquery.com/Downloading_jQuery[/url]
jQuery API文档:[url=http://docs.jquery.com/Main_Page]http://docs.jquery.com/Main_Page[/url]
jQuery 中国:[url=http://jquery.org.cn/]http://jquery.org.cn/[/url]
VisualJQuery.com : [url=http://visualjquery.com/]http://visualjquery.com/[/url]