IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
jQueryãè¯ããã25ã®TIPS ãã¿å ï¼Improve your jQuery - 25 excellent tips ã¡ãã£ã¨å¤ãã§ãããããªãè¯ãTIPSãã¾ã¨ã¾ã£ã¦ãã¾ãã Google AJAX Libraries APIãå©ç¨ããã Google AJAX Libraries APIãæ´»ç¨ããã°ãã°ããã©ã¤ãã©ãªãèªã¿è¾¼ããã¨ãåºæ¥ã¾ãã <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> // Load jQuery google.load("jquery", "1.2.6"); google.setOnLoadCallback(function() { // Your code goes here. }); </script> ç´æ¥èªã¿è¾¼ããã¨ãåºæ¥ã¾ãã
ååæ¸ãããJavascriptã«ãã大è¦æ¨¡éçºã®è¦ãæ¸ãããåããã¨ã«ãªã£ã¦ã¾ããã ä»åã¯ãçç¥ããã5.é«éåãããã«ã¤ãã¦æ¸ãã¾ãã åã«ã¨ã£ã¦javascriptã¯é常ã«é«éãªè¨èªã§ããããã¯ä½ãé«éã éçºé度ãé«éã§ãã éçºé度ãåã³ããã«è³ãã¾ã§ã®ä¿®å¾é度ã¯ã¨ã¦ãé«éã§ããåçè¨èªãä¸æãæãéçºè ã¯ãã¡ãããéçºã«ä¸æ £ããª(è¨èãæªããã©)æ°äººéã§ãããåããã¢ãããµã¯ã£ã¨ä½ã£ã¦ãã¾ããã ã¾ãããã©ãããã©ã¼ã (? ã¨ããããã©ã¦ã¶)ãåºãæ®åãã¦ããã®ã§ãã°ã°ãã°ã¹ã°ã«åé¡è§£æ±ºãã§ããã ããã«ãã¼ã«ã«ã§ç°¡åã«ä½ãããjavascriptãããã¯åä½ç°å¢ãå«ãã¦é«éã§ãã é«éã«UIæä½ãã§ãã(UIæä½ãé常ã«ç°¡åã§ãã) swingã¨ãã§UIæä½ãããã«ã¯å¤ãã®ãªãã¸ã§ã¯ãæä½ãããªããã°ãªããªããã©ãjavascript(ãã¨ãDHTML)ã¯é常ã«ç°¡åã«
ãã®ããã°ããMovable Type Open Source 4.1ã«ã¢ããã°ã¬ã¼ããã æåã¯ãæ®éã«Movable Type 4.1ã«ã¢ããã°ã¬ã¼ããããã¨æã£ãããMovable Type Open Source 4.1ã®å ¬éå®é¨å ´ãããã®ãæªããªãã¨æããå°å·ããã®ãªãã«ããã¦ãããMTOS-4.1-jaã使ããMovable Type 3.35ããMovable Type Open Source 4.1ã«ãã¼ã¸ã§ã³ã¢ããããã PHPåããå ´åã«ãããç¾è±¡ã¨åå ãã¦ãæ°ããããã°ãä½æãã¦ã[確èª]ãã¯ãªãã¯ããã¨ãã¬ãã¥ã¼ç»é¢ã表示ããããä¸è¨ã®ç»åã®ããã«ã¨ã©ã¼ã表示ãããã 表示ããã¦ããã¨ã©ã¼å ¨æã¯ä»¥ä¸ã Parse error: syntax error, unexpected T_STRING in /virtual/dakiny/public_html/www.
ããã > Movable Type > ä»æ¥ã®Movable Type 4.1:MT4.1ã¯å ¨ä»¶è¡¨ç¤ºã§ã<MTEntries>ã« lastn="N"ãå ¥ããªãã¨ãã¡ ä»æ¥ã®ã³ã©ã ã¯ãMovable Type 3.3xãããMovable Type 4.1ããMovable Type Open Source 4.1ã«ã¢ããã°ã¬ã¼ãããäºå®ã®æ¹ã«èªãã§ã»ããã å æ¥ãMT3.35ããMovable Type Open Source 4.1ã«ã¢ããã°ã¬ã¼ãããã®ã ããã«ãã´ãªã¼ã¢ã¼ã«ã¤ãã¨æå¥ã¢ã¼ã«ã¤ãã§ã¨ã³ããªã¼ãï¼ä»¶ãã表示ãããªãã 確ãã«index.htmlã§ã¯å ¬éè¨å®ã§æå®ããã¨ã³ããªã¼ä»¶æ°ãèªåçã«lastn="N"ã«è¡¨ç¤ºã«åæ ããããã ããã«ãã´ãªã¼ã¢ã¼ã«ã¤ãã¨æå¥ã¢ã¼ã«ã¤ãã¯ãã®ãããªè¨å®ã«ãã¦ãªãã¯ãã ã æ¨æ¸¬ã§ã¯ããããMT4ããã¯ãlastn="N"ãå ¥ããªãã¨ãå ¬éæ°
jQueryãã¼ã¹ã®ç»åãºã¼ã ã¤ã³/ã¢ã¦ãã®ãã©ã°ã¤ã³ãªãã¦ãããã§ãããããã©ãèªåã®æãããã«åããã®ããã£ãããããã®ããªãã£ãã®ã§ä½ã£ã¦ã¿ã¾ããã ä½äºãææ¦ããã®ã¿ã ç»åã大ãµã¤ãºã¨å°ãµã¤ãºï¼ãµã ãã¤ã«ç¨ï¼ã®2æç¨æãã¾ãã â»widthã¨heightã2åã«è¨å®ãã¦ããããã大ãµã¤ãºã¯å°ãµã¤ãºã®ä¸åº¦2åã®å¤§ããã«ããå¿ è¦ãããã¾ãã classåã"zoom"ã¨è¨å®ãããµã ãã¤ã«ãã¯ãªãã¯ããã¨èµ·åãã¾ãã ãµã ãã¤ã«ã®ä¸ã«å¤§ãµã¤ãºã®ç»åããµã ãã¤ã«ã¨åããµã¤ãºæå®ã§è¡¨ç¤ºããã¢ãã¡ã¼ã·ã§ã³ãããªããå ã®ãµã¤ãºã¾ã§æ»ããã¨ããåãããã¾ãã 大ãããªã£ãç»åãã¯ãªãã¯ããã¨éæ»ããããå¾åé¤ããã¾ãã ãºã¼ã ã®ãµã³ãã« 1æã®ç»åããã®ã¾ã¾å¤§ãããªã£ã¦ããããã«è¦ããããã©ãå®éã¯2æ使ã£ã¦ããã¨ããã ä»åã¯èªãµã¤ãç¨ã«ä½ã£ã¦ããã®ã§ã大ãµã¤ãºç»åã®ç¸¦æ¨ªã¯800*600ã«åºå®
WEB+DB PRESS ç·¨éã® R ãããããåã®é£è¼è¨äºã«èªè æ§ãã質åãæ¥ã¦ããã¨æãã¦ããã ããã®ã§ããã®å 容ãæãã¦ããã ãã¾ããã 以ä¸ãå 容ãè»¢è¼ ãJavaScriptããããéçºéãã®è¨äºã«é¢ãã¦è³ªåã§ãã ä»åã®å 容ã§ç¹ã«èå³ãæã£ãã®ã¯thisãã¼ã¯ã¼ãã®æ¯ãèãã§ããã thisãã¼ã¯ã¼ãã®èª¬æã«ã¯ããªãã¸ã§ã¯ãåã®å¤æ°ãå¥ã®å¤æ°ã«ã³ãã¼ãã¦ããåæåããã¨ãã³ãã¼ããå¤æ°ããã¡ã½ãããå®è¡ã§ããªããªãã¨ããä¾ãç´¹ä»ããã¦ãã¾ããã ããã«ã¯ãï¼1ï¼ã®æç¹ã§obj0ã«ã¯{}ãå ¥ã£ã¦ãããããhogeã¯æªå®ç¾©ã¨ãªã£ã¦ãã¾ããã¨ãã説æãããã®ã§ãããèªé¢ã®é½åä¸çç¥ãããããããthisãã¼ã¯ã¼ããç¨ãããã¨ã§åé¡ãåé¿ã§ããã¨ããçç±ããªããªãç解ã§ããªãã§ãã¾ãã èªåãªãã«èãã¦ã¿ãã¨ãããå é¨çã«ã¯ä»¥ä¸ã®ãããªãã¨ãèµ·ãã¦ããã®ã§ã¯ãªããã¨æãã¾ããã (1)
人æ§ã«ActionScript (ããã㯠JavaScript)ãæããæã«ã絶対ã«é¬¼éã¨ãªãthisã¹ã³ã¼ãã«ã¤ãã¦ã®ã¾ã¨ãã¡ã¢ã ECMAã¹ã¯ãªããã§ã¯é¢æ°ãä»ã®å¤æ°ã«ä»£å ¥å¯è½ãªçºãé¢æ°ã®thisãæèã«ãã£ã¦å¤åãã¾ããã©ãããJavaã¨ããã£ã¦ã人ã«ã¯ãããã¹ã´ã¤æ°æã¡æªããããã®ã§ãã thisã¨ãªä½ãªã®ãï¼ ç«¯çã«è¨ããªãã°ãthisã¯ããã®é¢æ°ããä½ã®ããããã£ã¨è§£éãã¦å¼ã³åºãããï¼ãã«ãã£ã¦æ±ºå®ãã¾ãã é¢æ°ãç´æ¥å¼ã³åºãå ´åã¨ããªãã¸ã§ã¯ãã®ããããã£ã«ä»£å ¥ãã¦ããå¼ã³åºãå ´åãæ¯è¼ãã¦ã¿ã¾ãã function hoge(){ alert(this); //trace(this); flashã®å ´åã¯ã³ãã } var myObj = new Object(); myObj.hoge = hoge; hoge(); myObj.hoge(); ã®ããã«æ¸ããå ´åã
ãããã¤ã³ã¹ãã¼ã«ä»£è¡¨ã®ã©ã¤ãããã¯ããã°
Libraã®ããã«ã½ã³ãã£ã¦ãã¨ãã話ã¯å æ¥ãHackLibraãæåã®ãªã³ã©ã¤ã³ããã«ã½ã³ãã§æ¸ãã¾ããã â¦
Make a note of it: Web tech, montaineering, and so on. Note: ãã®è¨äºã¯ã3年以ä¸åã«æ¸ããã¦ãã¾ããWebã®é²åã¯éãï¼æ å ±ã®æ£ç¢ºæ§ã¯èªå·±è²¬ä»»ã§å¤æãã¦ãã ããã ç¾å¨ä½ç½®ãåå¾ããã¨ãã®ã®åºæºã¨ãªããã¦ã£ã³ãã¦ã»ãµã¤ãºãããã¥ã¡ã³ãã»ãµã¤ãºãã¹ã¯ãã¼ã«éãåå¾ããJavascriptããã©ã¦ã¶äºæã¨ãã§å²ãã¨è¦å´ãã¾ããã ã¹ã¯ãã¼ã«éï¼æ¨ªï¼: ã¹ã¯ãã¼ã«éï¼ç¸¦ï¼: ã¦ã£ã³ãã¦ã»ãµã¤ãºï¼æ¨ªï¼: ã¦ã£ã³ãã¦ã»ãµã¤ãºï¼ç¸¦ï¼: ã¦ã£ã³ãã¦ã®ä¸å¤®ä½ç½®ï¼æ¨ªï¼: ã¦ã£ã³ãã¦ã®ä¸å¤®ä½ç½®ï¼ç¸¦ï¼: ããã¥ã¡ã³ãã»ãµã¤ãºï¼æ¨ªï¼: ããã¥ã¡ã³ãã»ãµã¤ãºï¼ç¸¦ï¼: 以ä¸ã«ã½ã¼ã¹ãåºãã¾ãã ã¹ã¯ãã¼ã«éãåå¾ function getScrollPosition() { var obj = new Object(); obj.x = document.
http://d.hatena.ne.jp/nazoking/20050425/1114374966 ã«é¢é£ãã¦ãååãçããã®ï¼ $ ã¨ããO ã¨ã X ã¨ãï¼ããã¶ã¤ããå¯è½æ§ãããã®ã§åºæ¥ããªãé¿ãã¦æ¬²ãããã¾ããæ®éã¯ãªããã ãã©ã ã§ãã©ããã¦ãçãååã使ããã人ç¨ã®ããªãã¸ã§ã¯ããåå空é代ããã«ä½¿ãæ¹æ³*1ã ä¾ãã° nazoking ã¨ããåå空éã«ããããå®ç¾©ããå ´åã if( typeof(nazoking)=='undefined' ) nazoking=new Object; // å®ç¾© nazoking.O = function(){ alert('Oã¨ããååã®è¶ 便å©é¢æ°'); }ã¿ãããªæãã§ã使ãã¨ã㯠var hoge = nazoking.O();ã§ããããåå空é nazoking ããã使ãã®ã§ããã° with(nazoking){ // ã¹ã¯ãªã
Make a note of it: Web tech, montaineering, and so on. Note: ãã®è¨äºã¯ã3年以ä¸åã«æ¸ããã¦ãã¾ããWebã®é²åã¯éãï¼æ å ±ã®æ£ç¢ºæ§ã¯èªå·±è²¬ä»»ã§å¤æãã¦ãã ããã ä¸åº¦ãã£ãã試ãã¦ããããã£ãå¤æ°ã¨ãã®æå¹ç¯å²ã«ã¤ãã¦ã JavaScriptã«ã¯å¤æ°ã®åã¨ããèãæ¹ããªãï¼ä»»æã®ãã¼ã¿åã®å¤ãä»£å ¥ã§ããï¼ JavaScriptã§ãµãã¼ãããããã¼ã¿åã«ã¯ãåºæ¬åã¨åç §åããã åç §åã®å¤æ°ã«ã¯ãåç §ãæ ¼ç´ãããï¼å®éã®ãã¼ã¿å¤ã§ã¯ãªãï¼ é¢æ°ãé åããªãã¸ã§ã¯ããªã©ãåç §å å¤æ°ã®æå¹ç¯å²ãããã®å¤æ°ã®ã¹ã³ã¼ãã¨ãã æé»çã«å®£è¨ãããå¤æ°ã¯ãå¿ ãã°ãã¼ãã«å¤æ°ã«ãªã é¢æ°ã®å é¨ã§æé»çã«å®£è¨ãããå ´åã§ããã°ãã¼ãã«å¤æ°ã«ãªã varæã§å®£è¨ããå¤æ°ã¯ããã¼ã«ã«å¤æ°ã«ãªã ãã¼ã«ã«å¤æ°ã®ã¹ã³ã¼ãã¯ããã®å¤æ°ã宣è¨ãããé¢æ°ã®
æ¢åºããã¼ é åã®çµå var array1 = [1, 2, 3]; var array2 = [4, 5, 6]; [].push.apply(array1, array2); alert(array1); // [1, 2, 3, 4, 5, 6] ï¼æç®ã§ç©ºé åã使ã£ã¦ãã®ã¯æ¸ãã®ãçãããã£ã¦ã ãã é åã®åæå function hoge() { var args = []; [].push.apply(args, arguments); alert(args); }; hoge(1, 2, 3); // [1, 2, 3]
ããã«ã¡ã¯ãããã¯ãã§ããæè¿ä¼æ¥ãå¤ãã®ã§æ°ããäºã試ãæ©ä¼ãå¢ãã¦ãã¾ããæè¿ã¡ãã£ã¨ã ãå§ããã®ã¯JavaScriptã®ã©ã¤ãã©ãªjQueryã§ããä»æ¥ã¯ãã®ãã¿ãæ稿ãã¾ãã ãã£ãã§ã¯ãæ¯é±30åÃ2ã³ãã®ç¤¾å åå¼·ä¼ãéå¬ãã¦ãã¾ãããã®ãªãã§ãsouãããæ¯é±é£è¼ã§éå¬ãã¦ããJavascriptè¬ç¿ä¼ã社å å¤ã§æãã®ã»ã好è©ã§ãã å ¨ç·¨åç»ã«ã¦ãã©ãèµã§å ¬éãã¦ãã¾ãã®ã§æ¯éã覧ã«ãªã£ã¦ã¿ã¦ä¸ããã ä»souããã®è¡ã£ã¦ããJavaScriptè¬ç¿ä¼ã§ã¯ãåºç¤ãåºããããããã¦ã©ã¤ãã©ãªã使ã£ã¦ãã¾ããããã©ã¤ãã©ãªã使ãã¨å®¿é¡ã®ã³ã¼ããã©ããããç°¡åã«ãªããèå³ãæã£ãã®ã§ãè¦ããã¦ã®jQueryã使ã£ã¦å®¿é¡ã®JavaScriptãæ¸ãç´ãã¦ã¿ã¾ããã 宿é¡ã®ã³ã¼ã ä¸ã®ã³ã¼ããä¾ã«jQueryã§æ¸ãæãã¦ã¿ã¾ãã /** * 課é¡ï¼ * JavaScript off
yamaokaã§ãã webãã¼ã¸ã®è¡¨ç¤ºãé«éåããææ³ã«ã¯ããããããã¾ããã ãã®ä¸ã¤ã¨ãã¦é 延èªã¿è¾¼ã¿ã¨ããææ³ãããã¾ãã åæç¶æ ã§è¡¨ç¤ºããå¿ è¦ã®ãªãè¦ç´ ã«ã¤ãã¦ã¯èªã¿è¾¼ã¾ãã å¿ è¦ã«ãªã£ãã¿ã¤ãã³ã°ã§èªã¿è¾¼ã¿ã表示ããããã«ããææ³ã§ãã ãã¼ã¸ã®èªã¿è¾¼ã¿ã«ãããæéã®å¤§åã ç»åã®èªã¿è¾¼ã¿ãå ãã¦ããå ´åãå¤ãã®ã§ã ç»åã®èªã¿è¾¼ã¿ãé 延ãããã¨ããææ³ãå¤ãåããã¾ãã æ¤è¨ããã¹ãã±ã¼ã¹ ã§ã¯ãç»åã®é 延èªã¿è¾¼ã¿ã¯ã©ã®ãããªå ´åã«æ¤è¨ãããã¹ãã§ããããã æåãã表示ããã¦ããå¿ è¦ããªãç»åãåå¨ãããã®ç»åã®ãµã¤ãºã大ããã£ããã ããããç»åã®æ°ãå¤ãå ´åã¯æ¤è¨ãã¦ã¿ã価å¤ãããã¨æãã¾ãã ä¾ãã°ã次ã®ãããªã±ã¼ã¹ã§ãã åæç¶æ ã§ã¯è¡¨ç¤ºãããªããããã¯ã«å±ããç»åãåå¨ãã JavaScriptã§è¡¨ç¤ºãããããªãããåãæ¿ãã¦ãããããªå ´å ãã¼ã¸ã®ãã¼ã£ã¨ä¸ã®
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
Safariã§JSONã®éä¿¡ãããã¨æååããã®ã§å¯¾å¿çãèãã¦ã¿ããã¡ãªã¿ã«Safari3betaã§ã¯æååãã¯è§£æ¶ããã¦ã¾ããã ã³ã¼ã 以ä¸ã®ã³ã¼ããã©ã¤ãã©ãªãèªã¿è¾¼ãã æå¾ã«å®è¡ãããã¨ã対å¿ããã¾ããã³ã¼ãã£ã³ã°ã¯æååãã¨ããå ¨ãæèããªãã§å¤§ä¸å¤«ã //Cross Browser Script Support (function(){ // the garble control for safari (XMLHttpRequest#responseText) var func01 = function(text){ var esc = escape( text ); if( esc.indexOf("%u") < 0 && esc.indexOf("%") > -1 ){ text = decodeURIComponent( esc ); } return text; };
é£åé¢ä¿ã®ã·ã§ããã³ã°ãµã¤ãã«ã¯ç´°å¿ã®æ³¨æãå¿ è¦ã¨ãªãã ãã¼ã ãã¼ã¸ä½æãããä¸ã§ãæã注æããªããã°ãªããªãã®ããæ³å¾çãã©ãã«ã®åé¿ã§ãã ãã®çºã«å¥ç´æ¸ã¨è¦ç´ã¨ãããã®ãå¿ ãè¨ããå¿ è¦ãããã¾ãã ä¾ãã°ã大å¦çã®äººããã¢ã«ãã¤ãã§ä½ãèããã«ãã¼ã ãã¼ã¸ãå注ããç¸æããåºãããè³æãå ã«ä½æããã¨ãã¾ãã 渡ãããè³æããæ¢ã«è¬äºæ³ã«éåãã¦ããã¨ãã¾ãï¼ããªãå¤ãï¼ã ããããéåãããã¼ã¸ãä½ã£ãå ´åãä½æããä¼ç¤¾ã¨ãWEBå¶ä½è ã«ç½°åãè¨ã渡ãããäºãããã¾ãã ãããåé¿ããçºãããªãããã¼ã ãã¼ã¸ä¸ã§ã®æç« çã®è²¬ä»»ã¯ãå ¨ã¦ä¾é ¼å ã«å§è¨ããè¦ç´ã絶対ã«æ±ãããã¾ãã ãããããã©ãã«åé¿ã¯ãããç¨åº¦è¬äºæ³ã¨å»å¸«æ³ã®ç¥èããããã°å ã«æéçãç·´ãäºãåºæ¥ã¾ãããä¸è¬çWEBå¶ä½è ã®ä¸ã«ã¯ãè¨èããç¥ããªã人ãå± ãã§ãããã ä»åã¯ãããããWEBä¸ã§ã®æããã©ãã«ã«ãªãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}