随笔分类 -  00.Javascript

React,RN,NodeJS
摘要:from:http://smashingspy.com/32-best-jquery-popup-window-dialog-box-example/JQuery7Tweet58<respond_social title="jQuery 32 Best jQuery Popup Window Dialog Box Example" keyword="32 Best jQuery Popup Window Dialog Box Example" category="jQuery " url="http://smashin 阅读全文
posted @ 2012-09-03 11:11 庚武 阅读(1516) 评论(0) 推荐(0)
摘要:http://gristmill.github.com/jquery-popbox/example.html#(function(){ $.fn.popbox = function(options){ var settings = $.extend({ selector : this.selector, open : '.open', box : '.box', arrow : '.arrow', arrow_border : '.arrow-border', ... 阅读全文
posted @ 2012-08-17 22:28 庚武 阅读(1147) 评论(0) 推荐(0)
摘要:NameIconsSize(in kb) Javascript LibraryTotalJavascriptSizeImagesSets ofmultipleimagesOther objectsAwesome Box23.5YUI (DOM-Events + Animation) (43k)66.5YesYesNoBumpbox5Mootools 1.2 (90k)95YesNoFLV and SWF, PDF objects, iframesCeeBox28jQuery (94k) + Jquery SWFObject (5k)127YesYesInline elements, Ajax. 阅读全文
posted @ 2012-08-08 18:23 庚武 阅读(279) 评论(0) 推荐(0)
摘要:http://www.jacklmoore.com/colorboxFeaturesSupports photos, grouping, slideshow, ajax, inline, and iframed content.Lightweight: 10KB of JavaScript (less than 5KBs gzipped).Appearance is controlled through CSS so it can be restyled.Can be extended with callbacks & event-hooks without altering the 阅读全文
posted @ 2012-08-08 18:20 庚武 阅读(870) 评论(0) 推荐(0)
摘要:http://code.google.com/p/jquery-loadmask/LoadMask jQuery plugin can mask DOM elements while their content is loading or changing to prevent user interactions and inform that some background task is still running. It is very light (~2Kb) and easy to use.The behavior of this plugin is largely based on 阅读全文
posted @ 2012-04-20 17:57 庚武 阅读(1968) 评论(0) 推荐(0)
摘要:/*console.dir( jQuery('#selector a.jt:eq(0)').data('events') );jQuery.each($('#selector a.jt:eq(0)').data('events'), function(i, event){ jQuery.each(event, function(i, handler){ console.log( handler.toString() ); });});*///console.log(eval('1+1'))console.time( 阅读全文
posted @ 2012-03-26 12:09 庚武 阅读(373) 评论(0) 推荐(0)
摘要:https://developers.google.com/closure/compiler/docs/gettingstarted_appGetting Started with the Closure Compiler ApplicationThe Hello World of the Closure Compiler ApplicationThe Closure Compiler application is a Java command-line utility that compresses, optimizes, and looks for mistakes in your Jav 阅读全文
posted @ 2012-03-14 02:02 庚武 阅读(719) 评论(0) 推荐(0)
摘要:http://code.google.com/p/closure-compiler/http://stackoverflow.com/questions/28932/best-javascript-compressorGoogle releasedClosure Compilerwhich seems to be generating the smallest files so far as seenhereandherePrevious to that the various optionswere as followBasicallyPackerdoes a better job at i 阅读全文
posted @ 2012-03-14 01:41 庚武 阅读(293) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-02-02 12:09 庚武 阅读(1) 评论(0) 推荐(0)
摘要:http://files.cnblogs.com/wucg/jscalendar-1.0___v1.51.zipJS DatePicker: jscalendar-1.0___v1.51from:http://sourceforge.net/projects/jscalendar/http://files.cnblogs.com/wucg/jscalendar-1.0___v1.51.zipQuick startupInstalling the calendar used to be quite a task until version 0.9.3. Starting with 0.9.3 I 阅读全文
posted @ 2011-10-15 12:25 庚武 阅读(644) 评论(0) 推荐(1)
摘要:from:http://www.ruanyifeng.com/blog/2011/06/designing_ideas_of_inheritance_mechanism_in_javascript.html作者:阮一峰日期:2011年6月 5日我一直很难理解Javascript语言的继承机制。它没有"子类"和"父类"的概念,也没有"类"(class)和"实例"(instance)的区分,全靠一种很奇特的"原型链"(prototype chain)模式,来实现继承。我花了很多时间,学习这个部分,还 阅读全文
posted @ 2011-06-30 17:54 庚武 阅读(168) 评论(0) 推荐(0)
摘要:<script type="text/javascript"> <!-- function MatchDemo(){ var r, re; // 声明变量。 var s = "The123 rain in Spain falls mainly in the plain"; re = /ain/ig; // 创建正则表达式模式。 r = s.match(re); // 尝试去匹配搜索字符串。 //debugger; //return(r); // 返回的数组包含了所有 "ain" // 出现的四个匹配。//////// 阅读全文
posted @ 2011-05-03 12:21 庚武 阅读(361) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" co 阅读全文
posted @ 2011-04-26 16:42 庚武 阅读(1582) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" co 阅读全文
posted @ 2011-04-25 22:28 庚武 阅读(1188) 评论(0) 推荐(0)
摘要:JSONP是一个非官方的协议,它允许在服务器端集成Script tags返回至客户端,通过javascript callback的形式实现跨域访问(这仅仅是JSONP简单的实现形式)。 1. $.getJSON <script> $(document).ready(function(){ $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", function(da 阅读全文
posted @ 2011-04-18 15:01 庚武 阅读(1540) 评论(0) 推荐(0)
摘要:闭包的基本概念闭包是可以包含自由(未绑定)变量的代码块;这些变量不是在这个代码块或者任何全局上下文中定义的,而是在定义代码块的环境中定义。“闭包” 一词来源于以下两者的结合:要执行的代码块(由于自由变量的存在,相关变量引用没有释放)和为自由变量提供绑定的计算环境(作用域)。在 Scheme、Common Lisp、Smalltalk、Groovy、JavaScript、Ruby 和 Python 等语言中都能找到对闭包不同程度的支持。闭包的价值闭包的价值在于可以作为函数对象 或者匿名函数,对于类型系统而言这就意味着不仅要表示数据还要表示代码。支持闭包的多数语言都将函数作为第一级对象,就是说这些 阅读全文
posted @ 2011-04-15 17:11 庚武 阅读(242) 评论(0) 推荐(0)
摘要:if(ev.preventDefault) { // Firefox ev.preventDefault(); ev.stopPropagation(); } else { // IE ev.cancelBubble=true; ev.returnValue = false; } 阅读全文
posted @ 2011-03-22 17:43 庚武 阅读(177) 评论(0) 推荐(0)
摘要:Validation是jQuery的一個很強的驗證使用者輸入的plugin,功能強就算了,還非常的有彈性,可以客制非常多的東西,這次要介紹的是7個Callback使用,讓用Validation更隨心所欲。 Callback 說明 預設值 submitHandler 在Submit之前,且所有驗證成功,可以在這裡改成用$.ajax()送出。 default (native) form submit invalidHandler 在Submit之前,且驗證失敗。 沒有 success 單項證驗成功,參數是err 阅读全文
posted @ 2011-01-24 14:45 庚武 阅读(436) 评论(0) 推荐(0)
摘要:源:http://docs.jquery.com/UI/Datepicker 阅读全文
posted @ 2011-01-13 10:18 庚武 阅读(8876) 评论(1) 推荐(0)
摘要:有bug在IE下正常,FF下出错.发现FF调试时,断点不能进.试过几次,找到了窍门.1.先打开firebug,定位到出错的页面. (一定要先打开firebug).2.打开脚本标签,定位到js文件. 查看JS代码的行号出现绿色加粗的行,表示可以打断点的.3.点击行号打断 点,触发相应事件,即可进入断点. 阅读全文
posted @ 2010-11-19 11:48 庚武 阅读(446) 评论(0) 推荐(0)