Code Archive Skip to content Google About Google Privacy Terms
ãããã«ðã«ãã¼ãðð«ð ð½ððð¦ @uupaa CoffeeScriptãã人ã«ä¸è¨ãjsã¯ã·ã³ã°ã«ã¹ã¬ããã ãã©å¿åé¢æ°ã§ã©ããããã¨é¢æ°ã®åºå£ã§ã¹ã¬ããã³ã³ããã¹ãããå¯è½æ§ããããã並åå¦çã«ã¹ã¬ãããã£ã¦ãããªãããã«æ°ãã¤ãã¦ãæè¿æã¢ã¬ã§ãæã¾ã§ã«ãã¼ã¸è¡¨ç¤ºãä¸å®å®ãªã®ãç´ãã¦ãã¨æ³£ãä»ããã奴ã¯ã¾ãã«ããã ã£ãã 2011-05-06 01:12:53 ãããã«ðã«ãã¼ãðð«ð ð½ððð¦ @uupaa CoffeeScriptã¯ãã£ããå¿åé¢æ°ã§ã©ããããããããã¿ã¤ãã³ã°ã«ä¾åããä½ãã§ãç¶æ é·ç§»ããã£ãããããææããã¦ãã¨å ã«xhrãçµãã£ã¦ãã¾ããããã§å¦çãã£ã¦ããã¦ãæºåã§ãã¦ãªãã®ã«ãã¼ã¸è¡¨ç¤ºå¦çãèµ°ã£ã¦ãå ¨ä½ãä¸å®å®ã«ãªããã£ã¦å¥´ã ã£ã 2011-05-06 01:15:23
ç¶ãæ¸ãã¾ãã uu.snippet å ¥é(2) è¤æ°ã®é¨åãä¸ã¤ã®snippet ã« - latest log Widget(Web ãã©ã¦ã¶ä¸ã§åä½ãã UI é¨å)ãä½ãã«ã¯ãæ§é ã HTML ã§ãè¦æ ãã CSS ã§ãã¢ã¯ã·ã§ã³ã JavaScript ã§è¨è¿°ãããã¨ã«ãªãã¾ãã Widget ãä½ãéã®åé¡ã¯å¤§ãã3ã¤ã æ¨æºç㪠JavaScript ã«ã¯ DOM æ§é ãã¹ã¿ã¤ã«ããã¢ããã¥ã¡ã³ãåãåãè¾¼ãä»çµã¿ãç¡ã(é å¼µãã°ãªãã¨ããªããã©ããµã¯ã£ã¨ãããªã) CSS ã«ã¯å®æ°ãå¤é¨åç §å¯è½ãªå¤æ°ã®æ¦å¿µãæ¬ å¦ãã¦ãã ç»åæ°ãç»åãµã¤ãºãã¬ã¤ã¢ã¦ãå¤æ´ã«èããã ãã®æ§é ãæããããã¨ãé常ã«é£ãããââCSSãªã©ã®å¤é¨ãã¼ã«ã«é ¼ããã妥åããããå®æ°(ãã¸ãã¯ã¯ã¼ã)ã¨ãã¦åãè¾¼ãããé¸æãããã¨ã«ãªã(å¤æ°ã使ããªãããã«çºçãããã©ã¤&ã¨ã©ã¼ãæ©ãæéãç¡é§ããã)
ã¡ãã£ã¨I/Fä¿®æ£ uupaa.js ã®åã ã®æ©è½ãã¡ãã£ã¨ãã¤ç´¹ä»ãã¦ãã¾ãã uu.image(url:URLString/URLStringArray, callback:Function) // [1][load image] uu.image(url, function(response) { ... }) // [2][load images] uu.image([url, ...], function(response) { ... })uu.image ã¯ç»åãã¾ã¨ãã¦ããªãã¼ãããçµãã£ãããç¥ãããã¦ãããæ©è½ã§ãã uu.image ã¯ã第ä¸å¼æ° url ã§æå®ãããç»åã®èªã¿è¾¼ã¿ãå®äºããã¨ã第äºå¼æ° callback ã§æå®ãããé¢æ°ã callback(images, ok) ã®å½¢ã§å¼ã³åºãã¾ããresponse.rv ã«ã¯ NodeArray ãã respo
ããä¸é±éã§ã³ãã³ãæ¹è¯ãé²ãã¦ãã HTML5 Forms ã® <input type="range"> 風å³ãªã¹ã©ã¤ãã¼ã³ã³ããã¼ã«ã¨ã <audio> ã®ã©ããã¼ãããæãã«ãªã£ãã®ã§ç°¡åãªãã¢ãä½ãã¾ããã http://uupaa-js.googlecode.com/svn/trunk/0.8/test/core/audio/player.htm IE6+ / Firefox / Safari / Chrome / Opera / iPhone(iOS4) ã§åãã¾ããAndroid ã¯æã£ã¦ããªãã®ã§è©¦ãã¦ãã¾ããããåãããã§ãã ãã©ã¦ã¶ã«ãã£ã¦ã¯ããã¼ã¿ã®ãã£ãã·ã¥ãå®äºãã¦ããªãã¨ä¸æãã·ã¼ã¯ã§ããªããã¨ãããã¾ãã # mp3 ã m4aãã¡ã¤ã«ã http://uupaa-js.googlecode.com/svn/trunk/ ãããã¦ã³ãã¼ããããã¼ã«ã«ã§åãã
Classã®ç¶æ¿ã«ã¤ãã¦ãµã³ãã«ã追è¨ãã¾ããã jQuery ã®ç¹å¾´çãªæ§æã uupaa.js ã§è¡¨ç¾ããæ¹æ³ã追è¨ãã¾ããã ãããã°æ¯æ´æ©è½ã«ã¤ãã¦è¿½è¨ãã¾ããã ç¹å¾´ uupaa.js jQuery åç version 0.1 (2008-06-07) version 1.0 (2006-10-27) ææ°ç version 0.8 (2010å¹´æ«ãäºå®) version 1.4.2 (2010-02-19) ã©ã¤ãã©ãªã®ç®æ¨ WebOSã®ããã³ãã¨ã³ã ä¸æ æ¬æ¥ã®ç¨é WebOS / WebApp DOMã®æä½ã¨ãµã¤ãã®è£ 飾 使ããæ¹ å°å ¥å®ç¸¾ãªã å°ãä¸è¦æ¨¡ãµã¤ã / ãã¼ã¿ã«ãµã¤ãç æ³å®ãããã³ã¢ã¦ã¼ã¶å±¤ ã¨ã³ã¸ã㢠ãã¶ã¤ãã¼ / ã³ã¼ãã¼ / ã¨ã³ã¸ã㢠åå空é uu (1ã¤) jQuery 㨠$ (2ã¤) ã©ã¤ãã©ãªã«ããèå¥åããªãã£ã¯ã¹ã®äºç´ uu ã¾ã
JavaScript 㧠Flash ã®ãããªæ»ãããªã¢ãã¡ã¼ã·ã§ã³ãè¡ãããã«ã¯ãã¯ãã¹ãã©ã¦ã¶ãªç¥èã®ä»ã«ãGC(ã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³)ããã©ãããã°å®å®ããå質ãã ããã®ããã¨ãã£ãã¹ãã«ãæ±ãããã¾ãã # GC ã®è©±ã¯ WEB+DB PRESS 57 ã§ã¡ãã£ã¨æ¸ãã¦ã¾ãã æ´¾æç®ãªã¢ãã¡ã¼ã·ã§ã³ãç®ç㧠jQuery ãæ¡ç¨ãã¦ããæ¹ãããã¨ã¯æãã¾ãããå®ã¯ uupaa.js ã§ã ã¢ãã¡ã¼ã·ã§ã³ã easing ãå©ç¨ã§ãããã§ããããã³ã£ããã ãã ãæ©è½ãããã¾ããããã ã¨ããã¿ããã®ã§ ã¿ããªå¤§å¥½ã jQuery 㨠uupaa.js ã®ã¢ãã¡ã¼ã·ã§ã³ã®å質ã®éããåãããããªãã¢ãä½æãã¦ã¿ã¾ããã iPhone/iPad ããIE6ãIE8㧠opacity ãåãæ¿ãã¦è¦ãã¨ãããããªã¨éããåããã¨æãã¾ãã http://jsdo.it/uupaa/uufx
MultiTouch 㨠SVG ã§éãã§ã¿ã¾ããã PCãªããã¦ã¹ãã¤ã¼ã«ã§æ¡å¤§/縮å°, ã·ãããã¼ãæ¼ããªãããã¤ã¼ã«ã§å転ã iPhoneãªããã³ãã§æ¡å¤§/縮å°ã¨å転ã ããªãã«ã¿ãããããªãã«ã¯ãªãã¯ã§å ã®ãµã¤ãºã«æ»ãã¾ãã jsdo.it http://jsdo.it/uupaa/MultiTouchSVGDragDrop SVG DOM I/F ä»ã®ã¨ããããããªæãã§èãã¦ã¾ã uu.svg(x, y, width, height, { attr }, { css }) uu.svg.g(translateX, translateY, { attr }, { css }) uu.svg.rect(x, y, width, height, rx, ry, { attr }, { css }) uu.svg.circle(cx, cy, r, { attr }, { css })
140æåãè¶ ãã¡ããã®ã§ããã¡ãã§ã JavaScriptãªã³ã¼ããæ¸ãã¦ãã¨ããã®ã¸ãã®å¦çã¯ã©ãã«ãä¾åãã¦ãªããããç¹å®ã®ã©ã¤ãã©ãªã®ä¸é¨ã§ã¯ãªããåä½ã§ãã¼ããã¦ã使ãããããªé¨åã¨ãã¦ã¾ã¨ããããããªããã¨ããã§ããã©ã¤ãã©ãªã®ä¸é¨ã¨ãã¦å©ç¨ããå ´åã«ã°ãã¼ãã«ãã¼ã ã¹ãã¼ã¹ãæ±æããã®ã¯ãã¡ã ããªããã¨ãèãããã¨ã¯ããã¾ããã? window.uu 以ä¸ãã©ã¤ãã©ãªã®ãã¼ã ã¹ãã¼ã¹ã¨ãã¦å©ç¨ãã¦ãã uupaa.js ã§ã¯ããã®ãããªå·¥å¤«ããã¦ãã¾ãã // === uu.base64 / window.base64 === (function(namespace) { namespace.base64 = { encode: base64encode, // base64.encode(data:String/ByteArray, // toURLSafe64:Boole
uupaa.js 0.7 ã®æ¦è¦ãã1åã§ããã¼ã£ã¨åããããã«æ¸ãã¾ããã ããèªä½10åã§æ¸ãã¦ãã®ã§ããã¼ãã©ã³ã»ãã¼ãã§ãã¯ã§ãå±ããã¾ãã uupaa.js ã®ãã«ã uupaa.js ã¨ãããã¡ã¤ã«ã¯ããã¾ããã å¿ è¦ãªæ©è½ãçµã¿åãããã¦ã¼ã¶ããã«ããã¦ä½ãã¾ãã ãã«ãã³ãã³ã ãã«ãæ¹æ³ã説æããã¹ã©ã¤ã: http://handsout.jp/slide/1909 b.php ããã«ãã³ãã³ãã«ãªãã¾ã(è¦PHP)ãããã±ã¼ã¸åã®ã»ãã«ã-m -y -g -j ãªã©ã®ãªãã·ã§ã³ãæå®ã§ãã¾ãã build/b.php ããã±ã¼ã¸å -m -m, -y, -g 㯠MS, Yahoo, Google 製ã®ã³ã³ãã¤ã©ã§ Minify ãã¾ãã -j ã¯ã³ã¡ã³ãã®åé¤ã¨ãã¡ã¤ã«ã®çµåã ããè¡ãã¾ãã ãã«ãã«æåããã¨ã uupaa.js 㨠build/mini.ããã±ã¼ã¸
Cookieããã大容éã®ãã¼ã¿ãã¯ã©ã¤ã¢ã³ããµã¤ãã«ä¿åããä»æ§ãããã HTML5 ã® Web Storage ã§ãã Web Storage ã¯ã¾ã çå®ä¸ã§ãã Firefox3.5+, IE8+, Safari4+, Opera10.50+ ãªã©ææ°ã®ãã©ã¦ã¶ã§ã¯æ¢ã«å©ç¨å¯è½ã§ããããä½å¹´ãå¾ ã£ã¦ãããªããä»ãã使ããããã§ããã? ããã§ãã¯ãã¹ãã©ã¦ã¶ãª Web Storage ç¸å½ã®æ©è½ã uupaa.js ã«å®è£ ãã¦ã¿ã¾ããã # sessionStorage ã¯å®è£ ãã¦ãã¾ããã ã㢠http://pigs.sourceforge.jp/blog/20100104/20100104_uu.storage.htm Firefox2+, Safari3.1+, IE6+, Google Chrome3+, Opera9.2+ ã§åä½ç¢ºèªãã¦ã¾ãã ã¹ãã¬ã¼ã¸ããã¯ã¨ã³ã 以
ããå¹ççãªã³ã¼ãã«å·®ãæ¿ãã¾ãã http://dev.w3.org/2006/webapi/selectors-api2/#matchesselector 㨠id:javascripter ããã®è¨äº Selectors APIã®matchesSelectorã¨ãåçãªãã¼ã¸ã§ã®ã¤ãã³ãå¦ç via http://d.hatena.ne.jp/javascripter/20091018/1255889085 ãåèã« uu.match(expr, ctx, rtype = 0) ãªé¢æ°ãæ¸ãã¦ã¿ã¾ããã // uu.match - document.matchesSelector like function function uumatch(expr, // @param String: "css > expr" ctx, // @param NodeArray/Node: matc
var ary1 = [1, 2]; var ary2 = [1, 2]; ããªããã£ããªå¤(æååã¨ãæ°å¤)ã ããæ ¼ç´ããã¦ãã2ã¤ã®é å(ary1 㨠ary2)ã®å 容ããåããã©ããã確èªãããå ´åã«â¦ function like(ary1, ary2) { if (ary1.length !== ary2.length) { return false; } var v, i = 0, iz = ary1.length; for (; i < iz; ++i) { if (ary1[i] !== ary2[i]) { return false; } } return true; } alert(like(ary1, ary2)); // true ã¨ãæ¸ãã¦ã¾ããã? ãã£ã¨çã⦠alert(ary1.join(",") === ary2.join(",")); // true ã
uu.ajax.queue ã¯é çªãå¾ ã¡åãããªã©ã®è¦åãæå®ãã Ajax ãªã¯ã¨ã¹ããå¯è½ã«ãã¾ãã uu.ajax.queue(cmd, [url, ...], [option, ...], [fn, ...], lastfn, ngfn) cmd ã«ã¯ "0+1+2" ã "a>b+c>d" ãªã©ã®ãããªè¦åãæååã§è¨è¿°ãã¾ã a+b ãªã a 㨠b ãåæã«èªã¿è¾¼ã¿ã¾ãã ãã©ã¦ã¶æ¯ã«ãåæã«ãªã¯ã¨ã¹ãå¯è½ãªæ°ã«å¶éãããã®ã§ãåæã«ãªããªããã¨ãããã¾ãã a>b ãªã a ããã¼ãå¾ã« b ããã¼ããã¾ãã a ã b ã®é¨åã«ã¯ä¸æåã®è±æ°å(0-9,a-z,A-Z)ãæå®ã§ãã¾ãã ããã§æå®ãã ID 㯠lastfn ã ngfn ã®ç¬¬ä¸å¼æ°(hash.id)ã«è¨å®ããããªã¯ã¨ã¹ãã®è¿½è·¡ã«å©ç¨ã§ãã¾ãã option ãªãã·ã§ã³ã Hash ã§æå®ãã¾ããçç¥å¯è½
ä»æ¥ã¯ãCSSã¢ãã¡ã¼ã·ã§ã³æ©è½ãæ å½ãã uu.tween.js ã®ãªã©ã¤ãããã¦ãã¾ããã uu.tween.js ãçµã¿è¾¼ãã¨ãCSS ã®è², ãµã¤ãº, ä½ç½®ãå©ç¨ããã¢ãã¡ã¼ã·ã§ã³ãå¯è½ã«ãªãã¾ããããèªä½ã¯ããããæ©è½ãªã®ã§ãããä»ã®ã©ã¤ãã©ãªã«ãªãç¹å¾´ã¨ãã¦ãCSSããããã£åå¥ã« easing é¢æ°ãå²ãå½ã¦ããã¾ãã ã㢠http://pigs.sourceforge.jp/blog/20091216/ ãã¼ã3å 㨠15åçãããã¾ãããã¼ãæ°ãéãã ãã§ä½èº«ã¯ä¸ç·ã§ãããã¢ã«ããå弧è»éã¯ãleft, top ã«å¥ã ã® easing é¢æ°ãå²ãå½ã¦ã¦å®ç¾ãã¦ãã¾ãã easing é¢æ° ããã©ã«ãã® easingé¢æ° 㯠easeInOutQuad ã§ããplug/easing/uup.easing.js ãçµã¿è¾¼ãã¨ä»ã®é¢æ°ãå©ç¨ã§ãã¾ãã http://code
[javascript][sprintf] ã§æ¤ç´¢ãã¦ãã©ãçãæ¹ãå¤ããããªã®ã§ãuupaa-0.7.js ããåãåºãã¦å¼µã£ã¦ã¿ã¾ãã /*!{id:"uupaa.js",ver:0.7,license:"MIT",author:"uupaa.js@gmail.com"}*/ window.sprintf || (function() { var _BITS = { i: 0x8011, d: 0x8011, u: 0x8021, o: 0x8161, x: 0x8261, X: 0x9261, f: 0x92, c: 0x2800, s: 0x84 }, _PARSE = /%(?:(\d+)\$)?(#|0)?(\d+)?(?:\.(\d+))?(l)?([%iduoxXfcs])/g; window.sprintf = _sprintf; function _sprintf(fo
uupaa.js 0.7 ã®ä¿®æ£å±¥æ´ã§ããèå³ããªãæ¹ã¯èªã¿é£ã°ãã¦ãã ããã window.xconfig ãå®ç¾©ããã¨å¤§ã¾ããªæåãè¨å®ã§ãã window.xconfig ã uupaa.js ãã¼ãåã«å®ç¾©ããã¨ã大ã¾ããªæåãè¨å®ã§ãã¾ãã ç¾å¨ã®ã¨ããã以ä¸ã®è¨å®é ç®ãããã¾ã(å¤æ´é©ç¨å¾ã®ãã®ã§ã) <script> window.xconfig = { aria: 0, // @param Number(= 0): 1 is enable WAI-ARIA debug: 0, // @param Number(= 0): 1 is debug mode, 0 is normal mode light: 1, // @param Number(= 1): 1 is light weight mode altcss: 0, // @param Number/Function(=
09-06-17 2009/06/17(æ°´)ã®ã¡ã³ããã³ã¹ä½æ¥ã¯çµäºãããã¾ããããè¿·æããæããã¾ããã 09-06-12 æ¥ã§ç³ã訳ãããã¾ãããã2009/06/17(æ°´)㯠ã¡ã³ããã³ã¹ä½æ¥ã®ãããä¸æçã«ã¢ã¯ã»ã¹ã åºæ¥ãªãç¶æ ã¨ãªãã¾ããäºããäºæ¿ä¸ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}