`

jQuery

阅读更多
JQuery速查表
http://www.gbsou.com/jquery-fact-sheet

http://docs.jquery.com/Main_Page
http://api.jquery.com/


http://visualjquery.com/

http://interface.eyecon.ro/

http://tablesorter.com/docs/


jquery min lite pack各版本的说明:
引用

jquery min lite pack各版本的说明:
jquery.js 全功能未压缩 开发者使用
jquery.lite.js [lite英文是精简版 未压缩 将注释去掉]
jquery.min.js  [min 英文最小版 精简版的压缩]
jquery.pack.js [全功能有压缩,]
pack压缩表示:浏览器及服务器端支持gzip 这样下载速度会很快.



jQuery对象和DOM对象的相互转换:
http://www.cnblogs.com/z-yy/archive/2012/07/17/2594963.html
http://www.cnblogs.com/ycbk/archive/2011/02/28/1967242.html


jquery的$("#formId").validate()里rules所指定的为element元素的name属性。


jQuery Selectors:
http://api.jquery.com/category/selectors/
引用
If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: \\. For example, if you have an element with id="foo.bar", you can use the selector $("#foo\\.bar").
页面有如下element:
<textarea name="fidsTextRefChannel.textFull" id="fidsTextRefChannel.textFull" rows="7" style="width:100%"></textarea>

为什么使用
$("#fidsTextRefChannel.textFull")
时得不到该element?这与jquery的选择器Selector有关:
$("#id")是 ID Selector:http://api.jquery.com/id-selector/
$(".myClass")是Class Selector:http://api.jquery.com/class-selector/
所以,当你使用 $("#fidsTextRefChannel.textFull") 时,jquery会认为You are trying to access the #fidsTextRefChannel with a class textFull
解决办法:
一 使用双反斜杠对id中的dot做转义:
$("#fidsTextRefChannel\\.textFull")
二 使用Attribute Equals Selector:
$("textarea[id='fidsTextRefChannel.textFull']")

#(hash) .(dot) 外其他常用的选择器:
空格(blank) : Descendant Selector  http://api.jquery.com/descendant-selector/
Help understanding JQuery Attribute Equals Selector:
http://stackoverflow.com/questions/3814966/help-understanding-jquery-attribute-equals-selector
引用
This selector:
$('#myid .two td[role=foo]')
means: find the element with ID "myid". From it find all descendants with a class of "two". From those elements find all descendants <td> elements that have a role attribute with a value of "foo".





$(document).ready 和 $(window).load 的区别:
Daily Tip : Difference between $(document).ready and $(window).load in jQuery:
http://web.enavu.com/daily-tip/daily-tip-difference-between-document-ready-and-window-load-in-jquery/
$(document).ready vs. $(window).load:
http://4loc.wordpress.com/2009/04/28/documentready-vs-windowload/




jQuery Validation Plugin:
http://stackoverflow.com/questions/4936221/jquery-validate-plugin-on-div
引用
The validation plugin is (currently) designed to work on a <form>, and only on a <form>.

因为jquery的validation只能针对form,那对分组验证(即页面需要一步一步点击“下一步”,最后做提交)该怎么做那?一种解决思路如下:
http://www.cnblogs.com/wangjq/archive/2011/03/13/1983024.html
或者:(待以后细看补充 ; search key:jquery individual   validate)
http://stackoverflow.com/questions/1495919/is-there-a-way-to-validate-individual-fields-in-jquery-not-the-whole-form
http://stackoverflow.com/questions/7429349/using-jquery-how-do-i-validate-individual-elements-and-show-the-relevant-error-m



jQuery学习之:Validation表单验证插件:
http://polaris.blog.51cto.com/1146394/258781

客户端验证的极品--jQuery.validator:
http://www.iteye.com/topic/255168
引用
jquery内置的maxlength验证的是输入的字符的长度。可以用这个来验证输入域的字节长度:
// 中文字两个字节   
jQuery.validator.addMethod("byteRangeLength", function(value, element, param) {   
  var length = value.length;   
  for(var i = 0; i < value.length; i++){   
   if(value.charCodeAt(i) > 127){   
    length++;   
   }   
  }   
  return this.optional(element) || ( length >= param[0] && length <= param[1] );   
}, "请确保输入的值在{0}-{1}个字节之间(一个中文字算2个字节)");   


jquery.validate的用法(自定义方法验证,服务端验证):
http://hi.baidu.com/lxylxy888666/blog/item/ee96ab7b0c26f1f90ad18724.html

editable select list, plugin for jQuery:
http://coffeescripter.com/code/editable-select/


下列代码:
$(document).ready(function() {

	
	$("input[name='fidsRuleParameter.type']").change(function() {
		//alert($(this).val());
		if($(this).val()=="I") {
			$("#intValueUnitSpan").text("<s:text name='parameter.form.intValueUnit'/>");
		} else {
			$("#intValueUnitSpan").text("");
		}
    });
	
});
<td width="85%" align="left">
		    <input type="text"  name="fidsRuleParameter.value" id="value" value="<s:property value="fidsRuleParameter.value"/>"  class="intValueClass"/>
		    <span id="intValueUnitSpan"><s:if test='%{#request.fidsRuleParameter.type=="I"}'><s:text name='parameter.form.intValueUnit'/></s:if></span>
		</td>
<tr bgcolor="#FFFFFF">
		<td width="15%" align="right"><label for="stationCode"><s:text name='parameter.form.type'/>: </label></td>
		<td width="85%" align="left">
			<s:radio id="fidsRuleParameter.type" name="fidsRuleParameter.type" theme="simple"
				list="#{'I':getText('parameter.grid.renderer.type.I'), 'S':getText('parameter.grid.renderer.type.S')}"/>
		</td>
	 </tr>

在IE下,radio的onchange事件在radio change时并没有被触发!而是在焦点移至页面其他域后才触发!这是IE的问题。解决办法是在jquery的ready方法中加上下列代码:
/** fix that problem:  If you click on a radio button, IE seems to wait with firing the change event until you leave the button **/
	$(function () {
	    if ($.browser.msie) {
			$('input:radio').click(function () {
				this.blur();
	            this.focus();
	        });
	    }
	});
相关链接:
http://norman.walsh.name/2009/03/24/jQueryIE
引用
If you click on a radio button, IE seems to wait with firing the change event until you leave the button, which is consistent with the behavior on other input fields (like text), but kinda unintuitive. The following piece of code fixes this behavior for me:
$(function () {
    if ($.browser.msie) {
        $('input:radio').click(function () {
            this.blur();
            this.focus();
        });
    }
});
在IE中关于Radio和Checkbox在JQuery中的change事件的立即触发:
http://blog.csdn.net/borishuai/archive/2009/12/08/4967696.aspx
分享到:
评论

相关推荐

    jQuery源码 jQuery源码 jQuery源码

    jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码jQuery源码...

    jquery-3.7.0.min.js(jQuery下载)

    jquery-3.7.0.min.js(jQuery下载)jquery-3.7.0.min.js(jQuery下载)jquery-3.7.0.min.js(jQuery下载)jquery-3.7.0.min.js(jQuery下载)jquery-3.7.0.min.js(jQuery下载)jquery-3.7.0.min.js(jQuery下载)...

    jquery-3.3.1.js和jquery-3.3.1.min.js

    jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-...

    JavaScript_JQuery_CSS_CSS_DIV漂亮的实例123个

    1. 2款jQuery图片自动切换常用广告代码 2. jquery+css五屏焦点图淡入淡出+圆形按钮切换广告图片代码 3. jQuery+CSS实用图片收缩与放大效果插件 4. jquery+div实现同时滑动切换的图文展示特效插件下载 5. ...

    开发工具 jquery-1.11.3.min

    开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-1.11.3.min开发工具 jquery-...

    开发工具 jquery.dataTables.min

    开发工具 jquery.dataTables.min开发工具 jquery.dataTables.min开发工具 jquery.dataTables.min开发工具 jquery.dataTables.min开发工具 jquery.dataTables.min开发工具 jquery.dataTables.min开发工具 jquery....

    前端+jQuery+实现烟花特效

    前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+jQuery+实现烟花特效前端+...

    jquery1.7中文手册CHM文档(附jquery1.82chm手册)

    资源名称:jquery1.7 中文手册 CHM文档(附jquery1.82 chm手册)内容简介:因国内jquery中文手册更新太慢了,等了一段时间实在等不下去了,干脆自己动手做一个丰衣足食,时刻更新. 最后感谢Shawphy提供1.4.1版,jehn提供...

    jQuery打印插件jqprint,内包含使用示例

    jQuery打印插件jqprint,jquery.jqprint-0.3.js 下载,内包含使用示例,下载解压可直接在浏览器打开使用。 jQuery打印插件jqprint,jquery.jqprint-0.3.js 下载,内包含使用示例,下载解压可直接在浏览器打开使用。 ...

    orgchart.js 组织架构图之JQuery插件

    组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件组织架构图之JQuery插件...

    jquery1.2.3到3.3.1版本都有

    jquery1.2.3到3.3.1版本都有: jquery-1.10.2.min.js jquery-1.11.1.min.js jquery-1.11.3.min.js jquery-1.2.3.min.js jquery-1.3.2.min.js jquery-1.4.2.min.js jquery-1.4.4.min.js jquery-1.5.2.min.js jquery-...

    jQuery v2.1.4 官方版.zip

    jQuery2.1.4来自jQuery官方网站,jQuery2.1.4包括jQuery2.1.4和jQuery2.1.4压缩版,即:jQuery2.1.4.js和jQuery2.1.4.min.js,jQuery是流行的JS框架! jquery-2.1.4 (注!jquery-2.0以上版本不再支持IE 6/7/8) ...

    Jquery智能提示完整全部版本vsdoc.js

    jquery-1.3.2-vsdoc.js jquery-1.8.3.min.js jquery-1.3.2.min.js jquery-1.4.1-vsdoc.js jquery-1.4.1.min.js jquery-1.4.2-vsdoc.js jquery-1.4.2.min.js jquery-1.4.3-vsdoc.js jquery-1.4.3.min.js ...

    jQuery入门jQuery入门

    jQuery入门,jQuery入门,jQuery入门,jQuery入门

    jQuery API 3.3.1 中文手册

    jQuery API 3.3.1 中文手册,jQuery是一个JavaScript框架,自面世以来,以其快速、简洁,能够很轻易地处理HTML文档、控制事件、给页面添加动画和Ajax效果等功能使多很多WEB编程者对其非常热爱,本手册旨在帮助广大...

    jquery插件库(jquery.treeview插件库)

    jquery插件库(jquery.treeview插件库)jquery插件库(jquery.treeview插件库)jquery插件库(jquery.treeview插件库)jquery插件库(jquery.treeview插件库)jquery插件库(jquery.treeview插件库)jquery插件库(jquery....

    jQuery、jQueryUI及jQueryMobile技巧与示例

    资源名称:jQuery、jQuery UI及jQuery Mobile技巧与示例内容简介:《jQuery、jQuery UI及jQuery Mobile技巧与示例》包括jQuery、jQuery UI、jQuery Mobile以及jQuery插件四部分内容。第一部分介绍jQuery核心库,从...

    JQuery UI包括(1.0.5、1.2、1.3、1.7、1.8、1.9)等版本另附文档

    里面附有: 1.easyUI.rar; 2.jQuery and jQuery UI Reference 1.2 API.zip...9.jquery-ui-1.8.16.custom (jQuery 1.3.2以上版本适用不包含 jQuery 1.3.2).zip; 10.jquery-ui-1.9m3.zip; 11.jquery-ui-17custom.zip;

    jQuery基础.pptx

    JavaScript+jQuery 网页特效设计 jQuery(3.4.1)基础 1 jQuery简介 jQuery优势 jQuery安装 jQuery语法 1、jQuery简介 1.1 学习jQuery之前,需要以下基础知识 HTML CSS JavaScript 1、jQuery简介 1.2 什么是jQuery? ...

    jquery精简版jquery-small.js

    jquery 精简版 jquery 精简版 jquery 精简版jquery 精简版 jquery 精简版 jquery 精简版 jquery 精简版

Global site tag (gtag.js) - Google Analytics