Keep-in-Viewã¯ãããã¼ãããã¿ã¼ã常ã«ç»é¢ä¸é¨ï¼ã¾ãã¯ä¸é¨ï¼ã«è¡¨ç¤ºãç¶ããjQueryã©ã¤ãã©ãªã§ãã æè¿ã®Webãµã¤ãã§ã¯ãããã¼ãã¹ã¯ãã¼ã«ãã¦ã常ã«è¡¨ç¤ºããç¶ããUIã人æ°ã§ããåæ§ã«ããã¿ã¼ã表示ãç¶ããããããªjQueryãã©ã°ã¤ã³ãKeep-in-Viewã§ãã æåã®è¡¨ç¤ºã§ãããããã¼ã¨ããã¿ã¼ã«æ³¨ç®ã§ãã ä¸çªä¸ã¾ã§ã¹ã¯ãã¼ã«ãã¾ããããããã¼ãæ®ã£ã¦ãã¾ãã éä¸ã¾ã§ã®ã¹ã¯ãã¼ã«ã®å ´åã¯æ®éã«ä¸ã«ä¸ãã£ã¦ããã¾ãã 表示ãããªãç¶æ ã¾ã§ããã¨èªåçã«ä¸ã«å¼µãä»ãã¾ããããã¿ã¼ã¯å¸¸ã«ä¸ã«ããã¾ãã Keep-in-Viewã§ã¯ãªãã»ãããCSSã®z-indexããªãã·ã§ã³ã¨ãã¦æå®ã§ãã¾ãã Keep-in-Viewã¯JavaScript/jQuery製ã®ã½ããã¦ã§ã¢ï¼ã½ã¼ã¹ã³ã¼ãã¯å ¬éããã¦ãã¾ããã©ã¤ã»ã³ã¹ã¯æè¨ããã¦ãã¾ããï¼ã«ãªãã¾ãã MOONGIF
Google ã®ã¦ã§ããã°å ¬éãã¼ã«ã使ã£ã¦ãããã¹ããåçãåç»ãå ±æã§ãã¾ãã
Nicholad Zakas, who wrote this book, recently spoke about JavaScript performance at Google; his presentation was called âSpeed Up Your JavaScriptâ and itâs available to view on Youtube. In the presentation Nicholas covers areas rarely talked about; he takes a low-level approach by explaining whatâs happening behind the scenes when you do something as simple as creating or requesting a variable in
Google Tech Talk June 4, 2009 ABSTRACT Web Exponents: Speed Up Your JavaScript Presented by Nicholas C. Zakas. As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript cod
JavaScriptActionScript/Flex ãã¿ãç¶ãã¦ããã®ã§ããã¾ã«ã¯ JavaScript ãã¿ããã¯ã¦ãçµç±ã§ç¥ã£ã æå°å®å ¨ããã·ã¥é¢æ°ã®ä½ãæ¹ ãé¢ç½ããã ã£ãã®ã ãã©ããæå°å®å ¨ããã·ã¥é¢æ°ããä½ãåãããªãã¾ã¾èªã¿é²ãããããã£ã±ã話ãåãããªããªã£ã¦ãã¾ã£ããåãããªãã¾ã¾ JavaScript ã«ç§»æ¤ã /* é ååã®æå°å®å ¨ããã·ã¥é¢æ° */ function ChangeNumber(arr) { var work = arr.concat(); var hash = 0; // éä¹å¤ãã¼ãã«ä½æ var FACTOR = [1]; for(var i=0; i { FACTOR.unshift(FACTOR[0] * (i+1)); } for(var i=0; i { hash += work[i] * FACTOR[i]; for (j=i+1;
JavaScript, eventé¢è¥¿ã§ JavaScript åå¼·ä¼ããã¨ãããã¨ã§ä¼ç»ããã Kanasan.JS ã«åå ãã¦ãã¾ãããç´°ããªã¬ãã¼ãã¯åæã«ä¸ãã£ã¦ãã®ã§ãä»æ´ã¾ã¨ããå¿ è¦ã¯ãªãããã§ããæè¡çãªã¢ã¬ã³ã¬ã«é¢ãã¦ã¯ã以ä¸ã®ï¼ã¤ã®ã¨ã³ããªãããã§ãã¦ã¾ããGreenbear Diary - Kanasan.JS (å¥åï¼prototype.jsã®ã½ã¼ã¹ã«ããã³ããå ¥ãããªã) ã«åå ãã¦ãã¾ããã¡ãã£ã¨Kanasan.JSã¾ã§ãã£ã¦ãã¾ãã - ã¯ãã¹ã«ã£ã#Kanasan.JS ã¬ãã¼ã: Days on the Moonãã®ä»ã®ã¬ãã¼ãã¯ã主å¬è ã®ã¨ã³ããªãKanasan.JSç¡äºçµäºãã¾ãã (Kanasansoft Web Lab.)ãã®ãã©ãã¯ããã¯ãã辿ããã®ã§ããã¡ããåèã«ãK-conbinatorPrototype.K é¢æ°ã«ã¤ãã¦ã ãè£è¶³ãã¦ãããã
JavaScriptjQuery ã使ã£ã¦ JSONP ã§ãªã¯ã¨ã¹ãããæ¹æ³ãï¼éãç´¹ä»ãããããã®ï¼: $("")createElement ã $() ã使ã£ã¦å®è£ ã $("") .attr('type', 'text/javascript') .attr('src', "http://www.example.com/jsonp.cgi?param1=value1&callback=myCallback") .appendTo($("head")); function myCallback(json){ // ãã¼ãå®äºæã«ãããå¼ã°ãã } http://www.example.com/jsonp.cgi?param1=value1&callback=myCallback ã«ãªã¯ã¨ã¹ãããããcallback ã®ã¨ããã¯ããµã¼ãã¹ã«ãã£ã¦æå®ã®ä»æ¹ãéããããããã®ï¼: $.ajax
JavaScriptJavaScript ã®ã¤ãã³ããã³ãã©ã«ã¤ãã¦æ®µéã追ã£ã¦èª¬æããç´ æ´ãããè³æããJavaScript ã®ã¤ãã³ããã³ãã© - daily dayflowerãã«æ¬¡ã®ãããªè¨è¿°ããã£ããJavaScript ã§é¢æ°ãå®ç¾©ããã®ã«ã¯ï¼ä¸è¨ã®3éãã®ææ³ãããã¾ãããfunction æãã«ãããé¢æ°å®ç¾©ã ãfunction æ¼ç®åãã«ãããé¢æ°å¼ã Function() ã³ã³ã¹ãã©ã¯ã¿Function() ã³ã³ã¹ãã©ã¯ã¿ã«ã¤ãã¦ã¯ä»åã¯è§¦ãã¦ãã¾ãããXXX() ã¯ãé¢æ°å®ç¾©ãï¼YYY ã¯ãé¢æ°å¼ãã«ãªãã¾ãããé¢æ°å®ç¾©ãã®å ´åï¼åè¿°ã®ããã«é¢æ°å®ç¾©ï¼å®è£ ï¼ãåæ¹åç §å¯è½ã«ãªãã¨ãã大ããªéããããã¾ãã JavaScript ã®ã¤ãã³ããã³ãã© - daily dayflowerè¨ãæããã¨ã window.onload = hoge; function hoge
JavaScriptæååç½®æã®ã話ãé常ãreplace ã¯ï¼åããç½®æãã¦ãããªãã >>> "aaaa".replace("a", "A") "Aaaa" ä½åº¦ãç½®æãããã«ã¯ãæ£è¦è¡¨ç¾ã使ãã®ãæã£åãæ©ãã >>> "aaaa".replace(/a/g, "A") "AAAA" ç½®æåã®æååãæååã§åãåã£ãã¨ãã«ã¯ãæ£è¦è¡¨ç¾ãªãã¸ã§ã¯ããä½ãã°ãããRegExp ã³ã³ã¹ãã©ã¯ã¿ã®ç¬¬äºå¼æ°ããã©ã°ã function myReplaceGlobal(str, before, after){ var reg = new RegExp(before, "g"); return str.replace(reg, after); } myReplaceGlobal("aaaa", "a", "A"); // AAAA ãã ã. ãä»»æã®æåã«ããããã¦ãã¾ã£ããã¨ãå¼å®³ãããã m
javascript, asjQuery ã®ã½ã¼ã¹ã³ã¼ããè¦ã¦ãã¦é¢ç½ãã®ããã£ãã function add(a, b){ addImpl(b && a, b || a); } function addImpl(a, b){ // ... } ç解ããããã«ã¯ãè«çæ¼ç®åã詳ããç解ããå¿ è¦ããããè«çæ¼ç®å詳細JavaScriptï¼ã¨ããã ECMAScriptï¼ã®è«çæ¼ç®åã¯ãè©ä¾¡çµæã true/false ã§è¿ããã訳ã§ã¯ãªããçµæã確å®ããæç¹ã§è©ä¾¡ããå¤ãè¿ããããã¾ãã¯ã|| ã試ãã¦ã¿ããã alert(2 || 0); // 2 alert(2 || 3); // 2 alert({} || null) // [object Object] alert(0 || 3); // 3 alert(0 || 0); // 0 alert(0 || undefined); //
javascriptjQuery ã®ã½ã¼ã¹ãå¼ãã§ãã¦ãã¤ãã³ãç»é²ã®ã¨ãããè¤éã ã£ãã®ã§åå¿é²ã¨ãã¦è¨ãã¦ããããã¼ã¸ã§ã³ã¯ 1.2.1ãããããã®ç®çDOM æ¨æºã® removeEventListener ã¯ãelement 㨠type(click, submit, blur ãªã©) 㨠listener ã®ï¼ã¤ãæå®ããå¿ è¦ãããã element.removeEventListener(click, listener, false); jQuery ã§ã¯ã¤ãã³ã解é¤ã« unbind ã¨ãã便å©ãªé¢æ°ãç¨æããã¦ãããelement, type, listener ãæå®ãã¦è§£é¤ããï¼é常㮠removeEventListener ã¨åãï¼element, type ãæå®ãã¦å ¨ã¦ã®ã¤ãã³ããã³ãã©ã解é¤ããelement ããå ¨ã¦ã®ã¤ãã³ãã解é¤ããä¾ãã°ã $("#foo")
JavaScriptjQuery ã¯æ©è½ãè±å¯ãªã®ã§ããã°ãã使ããªãã¨å¿ãã¦ãã¾ããããã§ã¯ãjQuery ã¨é åã®é¢ä¿ã«çµã£ã¦ç®çå¥ã«éå¼ãã§ããããã«ãã¦ãããé åãã jQuery ãªãã¸ã§ã¯ããä½æ$ é¢æ°ã«æ¸¡ãã°OK $([1,2,3]) NodeList ã®ãããªé åã£ã½ããã®ã渡ãã¦ã解éãã¦ãããã $(document.getElementsByTagName("div")) // $("div") ã¨åã â»å é¨çã«ã¯ setArray ã¡ã½ãããå¼ã°ãã¦ãããå¤ãã使ããã¨ã¯ç¨ãjQuery ãé åã®ããã«æ±ãè¦ç´ æ°ãåå¾ããlength ããããã£ã使ãã°OKã $("div").length // document.getElementsByTagName("div").length ã¨åã jQuery ã®ã¡ã½ããã使ã£ã¦æä½ããéãã¯ãé©åã« length
JavaScriptjQuery ã® extend ã¡ã½ããã¯ä¾¿å©ãªãã ãè¤éã§å¿ãã¦ãã¾ããã¡ãªã®ã§ã¡ã¢ãã¦ãããjQuery.extend ã®å¼ã³åºããã¿ã¼ã³ã¯æ¬¡ã®ï¼éãã$.extend([deep,] target, obj1, [obj2, [obj3, ...)$.extend([deep,] obj)$.fn.extend([deep,] obj)$(...).extend([deep,] obj)å ¨ã¦ã®ãã¿ã¼ã³ã§ç¬¬ä¸å¼æ°ã« [deep,] ããããããã¯ãªãã·ã§ã³ã®å¼æ°ã§ true ãæå®ããã¨ãã£ã¼ãã³ãã¼ãã¦ãããã以ä¸ã§ã¯åãããããããããã« deep ãªãã·ã§ã³ã¯çç¥ããä¸è¦§ãæ²è¼ããã$.extend(target, obj1, [obj2, ...)$.extend(obj)$.fn.extend(obj)$(...).extend(obj)ã ãã¶ã·ã³ãã«ã«ãª
ãããã¤ã³ã¹ãã¼ã«ä»£è¡¨ã®ã©ã¤ãããã¯ããã°
Anyone who has done some web development over the last decade and a half has definitely heard about jQuery. This library did excellent work when it came to taking care of browser inconsistencies. You also had to write significantly less code compared to pure JavaScript in order to get something done. The large ecosystem of plugins around jQuery was also very helpful. The regular improvements in we
Thanks to everyone that attended the jQuery London and London Web Standards meetups this month. As requested, here are the slides from my talks including links to all of the jsPerf tests embedded for each section. Summary In case you missed the talk, the main takeaway from it was the importance of performance-testing your JavaScript and jQuery code (and appreciating performance gotchas you can kee
ãããã¤ã³ã¹ãã¼ã«ä»£è¡¨ã®ã©ã¤ãããã¯ããã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}