随笔分类 -  jQuery/Javascript

摘要:(function($) { $.fn.fixedSidebar = function(options) { var defaults = { width: 100, height: 20, horizontalType: 'left', /*left,right*/ horizontalValue:20, verticalType:'top', /*top,bottom*/ verticalValue:30, berth:'browser', /*browser,wrap*/ wrapWidth:960... 阅读全文
posted @ 2013-05-15 17:14 Rex.He 阅读(421) 评论(0) 推荐(0) 编辑
摘要:Lazy Load Plugin for jQueryLazy Load is a jQuery plugin written in JavaScript. It delays loading of images in long web pages. Images outside of viewport (visible part of web page) wont be loaded before user scrolls to them. This is opposite of image preloading.Using Lazy Load on long web pages cont. 阅读全文
posted @ 2012-08-17 13:49 Rex.He 阅读(1127) 评论(0) 推荐(0) 编辑
摘要:官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validationjQuery plugin: Validation 使用说明转载自:http://blog.sina.com.cn/s/blog_608475eb0100h3h1.html一导入js库<script src="../js/jquery.js" type="text/javascript"></script><script src="../js/jquery.validate.js&qu 阅读全文
posted @ 2011-11-17 10:04 Rex.He 阅读(315122) 评论(37) 推荐(67) 编辑
摘要:侧栏广告简单插件<script src="JS/jquery-1.6.2.min.js" type="text/javascript"></script>(function($){$.fn.barScroll=function(options){/*width:宽度height:高度model:模式image,flashtop:距顶的距离bargap:左边或右边的距离bartype:挂靠模式left,rightlink:跳转链接src:文件链接*/vardefaults={width:100,height:20,model: 阅读全文
posted @ 2011-10-31 13:31 Rex.He 阅读(316) 评论(0) 推荐(0) 编辑
摘要:一个简单的小功能<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><styletype="text/css">html,body{width:100%;height:100%;margin:0px; 阅读全文
posted @ 2011-10-13 10:11 Rex.He 阅读(780) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>仿Flash的jquery横向滑动菜单_网页代码站</title><scripttype="text/javascript&q 阅读全文
posted @ 2011-10-06 11:27 Rex.He 阅读(1157) 评论(0) 推荐(0) 编辑
摘要:插件地址:http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/部分参数说明:$.fn.prettyPhoto = function(pp_settings) { pp_settings = jQuery.extend({ animation_speed: 'fast',//速度 slideshow: 5000, autoplay_slideshow: false, opacity: 0.80, //透明度 show_title: true, allow_resize: tr 阅读全文
posted @ 2011-09-02 11:26 Rex.He 阅读(1925) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/&g 阅读全文
posted @ 2011-08-24 12:30 Rex.He 阅读(502) 评论(0) 推荐(0) 编辑
摘要:转载:http://www.iteye.com/topic/545971jQuery插件的开发包括两种:一种是类级别的插件开发,即给jQuery添加新的全局函数,相当于给jQuery类本身添加方法。jQuery的全局函数就是属于jQuery命名空间的函数,另一种是对象级别的插件开发,即给jQuery对象添加方法。下面就两种函数的开发做详细的说明1、类级别的插件开发类级别的插件开发最直接的理解就是给jQuery类添加类方法,可以理解为添加静态方法。典型的例子就是$.AJAX()这个函数,将函数定义于jQuery的命名空间中。关于类级别的插件开发可以采用如下几种形式进行扩展:1.1 添加一个新的全 阅读全文
posted @ 2011-05-18 12:46 Rex.He 阅读(318) 评论(0) 推荐(0) 编辑
摘要:varjson={"options":"[{\"text\":\"太仓\",\"value\":\"1\"},{\"text\":\"昆山\",\"value\":\"2\"},{\"text\":\"苏州\",\"value\":\"3\"}]"}json=eval(json.options)$.each(json, 阅读全文
posted @ 2011-05-14 15:33 Rex.He 阅读(7399) 评论(0) 推荐(0) 编辑
摘要:页面PageA.html Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/D... 阅读全文
posted @ 2010-01-28 16:37 Rex.He 阅读(2338) 评论(0) 推荐(0) 编辑
摘要:动态的操作客户端控件,现在流行的有2种方法,一是innerHTML,这种方法无可厚非,一样可以完成任务,但我不推荐这种方法,二是window.document.createElement(), 例如:在web中有这样一段标记 <div id="TestDIv"></div> 我们可以这样在DIV中创建一个table: var table = window.document.... 阅读全文
posted @ 2010-01-20 09:22 Rex.He 阅读(201) 评论(0) 推荐(0) 编辑
摘要:我把验证代码,简单的验证为空放在ascx里了。按钮的单击事键也对应了checkForm()了。 <scriptlanguage="JavaScript"><!--functioncheckForm(){if(document.Form1.txtUserName.value.length==0){alert("请输入用户名.");document.Form1.txtUserNam... 阅读全文
posted @ 2010-01-20 09:20 Rex.He 阅读(1126) 评论(0) 推荐(0) 编辑
摘要:jQuery操作cookie的插件下载地址:jquery.cookie.jsjquery.cookie.pack.js(压缩版)作者地址:http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/操作:$.cookie(‘the_cookie’); // 读取 cookie$.cookie(‘the_... 阅读全文
posted @ 2010-01-04 21:34 Rex.He 阅读(7743) 评论(0) 推荐(1) 编辑
摘要:一、初识cookie写法我们面对的是 cookie 的字符串,你自己编写这个字符串写入客户端,然后自己解析这个字符串。var the_date = new Date("December 31, 2020"); var expiresDate = the_date.toGMTString(); document.cookie = "userDefineCSS=" + escape(title) + ... 阅读全文
posted @ 2010-01-04 21:14 Rex.He 阅读(776) 评论(0) 推荐(0) 编辑