
jquery
kawayime
这个作者很懒,什么都没留下…
展开
-
jquery validation 为class添加validation
JS: [code="js"]$.validator.addClassRules("customer", { required: true, minlength: 2 }); [/code] HTML: [code="html"] [/code]原创 2010-12-22 11:49:56 · 165 阅读 · 0 评论 -
jQuery validation动态返回验证信息
jquery validation在自定义验证时常常需要动态返回一些信息,例如当前输入框的值.但validation的验证消息是在页面初始化完后就已经生成.这时就需要在自定义messages中定义函数,这样才能达到我们要的效果,下面是一个例子,说的是验证当前用户是否存在,如果不存在,将当前输入的用户名带到注册页面:[code="js"] $.validator.addMethod("c...2011-01-12 16:48:15 · 301 阅读 · 0 评论 -
jquery操 select
一、 获取select中选择的text与value相关的值获取select选择的Text : var checkText=$("#slc1").find("option:selected").text();获取select选择的value:var checkValue=$("#slc1").val();获取select选择的索引值: var checkIndex=$("#s...原创 2011-05-12 20:19:32 · 82 阅读 · 0 评论 -
多选下拉框:jquery multiselect
该插件的主页,上面的例子和API已经够详细的了。[url]http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/[/url]原创 2011-05-16 20:12:44 · 211 阅读 · 0 评论 -
unbind "hover" in jQuery
$(this).unbind('hover') doesnt work.but this works:$(this).unbind('mouseenter mouseleave');原创 2011-08-20 14:21:47 · 104 阅读 · 0 评论 -
修改 uploadify 以正确显示中文buttonText
uploadify 目前不能正确显示中文的按钮文本。 我发现bug的原因是uploadify错误的使用了 js 的 escape 和 flash 的 unescape配对,而这2个是不兼容的。正确的转码传递参数应该用 encodeURI/decodeURI 配对,这2个函数的行为在js和flash里是相同的。其他地方的escape/unescape也应该替换掉,下面只修改影响按钮文本的部分...原创 2011-06-12 21:05:07 · 160 阅读 · 0 评论 -
json化表单
[code="js"](function( $ ){ $.fn.serializeJSON=function() { var json = {}; jQuery.map($(this).serializeArray(), function(n, i){ json[n['name']] = n['value']; }); return json; };...原创 2011-10-07 13:20:28 · 118 阅读 · 0 评论 -
jquery radio操作
[code="js"]$("input[type=radio]").change(function(){alert($("input[type=radio]:checked").val())})[/code]原创 2012-03-06 11:37:19 · 133 阅读 · 0 评论 -
jquery 瀑布流插件
基于jquery,支持window-resize和ajax取数据;测试通过ie6+,FF3+,chrome,safari;github地址:[url]https://github.com/chembohuang/jquery.waterfall.plugin[/url]demo地址:[url]http://paradise4ever.com/waterfall/demo.html[/u...原创 2012-07-07 20:57:08 · 126 阅读 · 0 评论