[code]String.prototype.replaceAll=function(s1,s2){returnthis.replace(newRegExp(s1,"gm"),s2);};(function($){/**$-layer0.1-jquerypulg-in**Copyright(c)2008KingWong*$Date:2008-09-28$*/var___win___=window.self;var___self___=window.self;var___id___="";var___settings___={};varisMouseDown=false;varcurrentEl...
http://www.jb51.net//article/16048.htm
[code](function($){$.fn.extend({selectColor:function(){var_d=newDate();var_tem=_d.getTime();returnthis.each(function(){varshowColor=function(_obj){var_left=parseInt($(_obj).offset().left);var_top=parseInt($(_obj).offset().top);var_width=parseInt($(_obj).width());var_height=parseInt($(_obj).height())...
http://www.jb51.net//article/16047.htm
[code]---common.jquery.js+++common.original.js@@-8,28+8,28@@*/varlang=newArray();varuserAgent=navigator.userAgent.toLowerCase();varis_opera=userAgent.indexOf('opera')!=-1&&opera.version();varis_moz=(navigator.product=='Gecko')&&userAgent.substr(userAgent.indexOf('firefox')+8,3);varis...
http://www.jb51.net//article/15922.htm
基本的鼠标互动:拖拽(draganddropping)、排序(sorting)、选择(selecting)、缩放(resizing)各种互动效果:手风琴式的折叠菜单(accordions)、日历(datepickers)、对话框(dialogs)、滑动条(sliders)、表格排序(tablesorters)、页签(tabs)、放大镜效果(magnifier)、阴影效果(shadow)第一部分:鼠标交互1.1Draggables:拖拽所需文件:ui.mouse.jsui.draggable.jsui.draggable.ext.js用法:文件载入后,可以拖拽class="block"的层$(d...
http://www.jb51.net//article/15863.htm
但问题来了,由于jQuery以及prototype都使用了美元符函数“$”作为选择器,在两者混合使用的时候$函数被重复定义了,结果导致其中一个框架不能使用。不过很快,有很多人给出了解决方案,如比较流行的方案是这样的:[code]<scriptsrc="http://jquery.com/src/latest/"></script><scripttype="text/javascript">JQ=$;//rename$function</script><scriptsrc="prototype.js"></script>&l...
http://www.jb51.net//article/15862.htm
在我们的应用中一般会是这样的,使用了jquery作为客户端框架,ajax请求也通常返回html或者json。html这里就不讨论了。返回json一般都是搞一个handler.ashx来处理请求,拼凑字符串来返回json。从而放弃了ws,因为ws返回的是xml,使用起来不方便。所以我觉着比较完美的解决方法是让ws返回json而且不用asp.netajax的客户端框是比较理想的解决方法。通过观测发现asp.netajax的客户端框架请求webservice的时候返回的是json,为什么webservice没有返回xml而返回了json呢?抓包分析到,关键在request的headers中“Cont...
http://www.jb51.net//article/15852.htm
html页面[code]<formonsubmit="if(confirm('确定好你所填写的正确,不然会发错!')){returncheckForm();}else{returnfalse;}"><table><tr><td>选择发送人<fontclass="red">*</font></td><td><inputtype="text"name="sendto_type[]"id="sendto_type1"value="1">按城市发送</td></tr>&l...
http://www.jb51.net//article/15837.htm
jquery.checkboxes.zip,然后解压引用到使用插件的页面,这个不用多说了吧!下面看具体例子,为了让大家更好的理解,我直接把实现功能的代码贴出来:[code]$("#myform").toggleCheckboxes()//全选,取消全选,反选$("#myform").toggleCheckboxes(":not(#checkbox1)")//全选,取消全选且不选中第一个,反选$("#myform").toggleCheckboxes(".top5",true)//全选,取消全选且只选前五个,反选$("#myform").checkCheckboxes();//全选$("#myf...
http://www.jb51.net//article/15625.htm
使用方法:我们先把下面的JS保存为有个文件,到时候调用,淡然你也可以直接写在页面内,推荐使用前者,方便重用:[code](function($){$.fn.checkgroup=function(options){//mergesettingssettings=$.extend({groupSelector:null,groupName:'group_name',enabledOnly:false},options||{});varctrl_box=this;//allowagroupselectoroverrideoptionvargrp_slctr=(settings.groupSelec...
http://www.jb51.net//article/15624.htm
[code]<scripttype="text/javascript">$(function(){$("#checkall").click(function(){$("input[@name='checkname[]']").each(function(){$(this).attr("checked",true);});});$("#delcheckall").click(function(){$("input[@name='checkname[]']").each(function(){$(this).attr("checked",false);});});});</scr...
http://www.jb51.net//article/15623.htm
使用方法:[code]$.hotkeys.add('键名',function(){要实现的目的});//键名可以是单键,也可以是组合键例如:ctrl+c就表示同时按下ctrl和c.[/code]取消某个键的事件:[code]$.hotkeys.remove('键名');[/code]具体演示效果请转到我专门翻译的一个页面,你可以自己测试特殊键和组合键:http://img.jb51.net/online/jquery_HotKeys.html下载插件地址::http://code.google.com/p/js-hotkeys/downloads/list...
http://www.jb51.net//article/15621.htm
