APIã使ã£ã¦ãã£ã¼ãã®åå¾ã«æåããå¾ã¯ããã£ã¼ãããã¿ã¤ãã«ãã¨ã³ããªãªã©å¿ è¦ãªãã¼ã¿ãåãåºãã¦å©ç¨ãã¾ããããã§ã¯ãã£ã¼ãããå¿ è¦ãªãã¼ã¿ãåãåºãæ¹æ³ã«ã¤ãã¦è§£èª¬ãã¾ãã 1.ãã£ã¼ãã«å«ã¾ããããããã£ã®ç¨®é¡ 2.ãã£ã¼ãã«é¢ããæ å ± 3.ã¨ã³ããªã«é¢ããæ å ± 4.ãµã³ãã« ãã£ã¼ãã®åå¾ã«æåããå ´åãããã©ã«ãã®å¤ã§ããJSONå½¢å¼ãæå®ãã¦ããå ´åã¯ãfeedãããããã£ã®å¤ã®ä¸ã«ãã£ã¼ãã®å 容ãå«ã¾ãã¦ãã¾ãããfeedãããããã£ã®å¤ã¯æ¬¡ã®ãããªæ§æã¨ãªã£ã¦ãã¾ãã feed feedUrl title link description author entries[] mediaGroup title link content contentSnippet publishedDate categories[] ã§ã¯é ã«åå¤ãåå¾ãã¦ã¿ã¾ãã
åå¿é². ã¹ããããçã«ä½¿ã£ã¦ããããã°å¹¸ãã§ã. DOM è¦ç´ ã®çµ¶å¤åº§æ¨ãåå¾ãã element.scrollTop ã¨ãã ã¨è¦ªããã®ç¸å¯¾å¤ã«ãªã£ã¡ããã¾ã. getBoundingClientRect() ã使ãã°çµ¶å¯¾åº§æ¨ãåå¾ã§ãã¾ã. window.onload = function() { var element = document.getElementById('hoge'); // hoge ã¨ããIDãã¤ãããã¤ãåå¾ãã var rect = element.getBoundingClientRect(); console.log(rect.left); // x座æ¨(絶対座æ¨) console.log(rect.top); // y座æ¨(絶対座æ¨) console.log(rect.width); // å¹ console.log(rect.height); /
Youtubeã§å ¬éããã¦ããåç»ã®åçåæ°/ã³ã¡ã³ãæ°/å ¬éæ¥ãªã©ããå¤é¨ã®Webãµã¤ãã«è¡¨ç¤ºããæ¡ä»¶ãããã¾ããã®ã§ã以ä¸ã«æ¹æ³ãã¡ã¢æ¸ãã¾ãããæ©ä¼ãããã¾ãããããåèãã ããã Youtube APIã使ãåç»æ å ±ãåå¾ããã«ã¯ãGoogleããæä¾ããã¦ãããYouTube Data APIããYouTube Analytics APIããªã©ã使ãã®ãæã£åãæ©ãã§ããã¨ããããã§ã使ã£ã¦ã¿ã¾ãããï½ã Google APIã³ã³ã½ã¼ã«ã§ä½æ¥ã¾ãã¯åæºåããã¾ããGoogleã¢ã«ã¦ã³ãã§ãã°ã¤ã³æ¸ã¨ãã¦Google APIã³ã³ã½ã¼ã«ãéãã¾ããï¼Googleã¢ã«ã¦ã³ãããªãæ¹ã¯ããã¡ãã§ä½æã§ãã¾ãï¼ APIãæå¹åãã次ã«ãGoogle APIã³ã³ã½ã¼ã«ãéããããå·¦å´ã«ãAPIsããããã®ã§ã¯ãªãã¯ãã¾ãã APIã®ä¸è¦§ã表示ããã¾ãã®ã§ãä¸ã®ç»åã«ããããã«ãYouTube
YouTube API ã使ã£ã¦åç»æ å ±ãåå¾ããããããã¨ããã£ã¦ã¿ãã®ã§ãåå¾ã§ãããã¼ã¿ã®ç¨®é¡ã使ãæ¹ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ããã sponsored link ãã°ã¤ã³ä¸ã®ã¦ã¼ã¶ã¼ãã¼ã¿ãåãåã£ããä½ãç»é²ãããããå ´åã«ã¯èªè¨¼ãå¿ è¦ã«ãªã£ã¦ãã¾ãããã®è¨äºã§ã¯èªè¨¼ãå¿ è¦ãªããåç»åçã«é¢ãããã¼ã¿ã®åãåãã«ã¤ãã¦æ¸ãã¦ãã¾ãã å ¬å¼ããã¥ã¡ã³ã æ¥æ¬èªã®å ¬å¼ããã¥ã¡ã³ããããã¾ãã ãããããã¼ ã¬ã¤ã: Data API ãããã³ã« â YouTube â Google Developers åèãµã¤ã YouTube API ãç¥ãã®ã«åèã«ããã¦é ãã¾ããã 第3åãYoutube APIã¨jQueryã使ãããªãï¼jQueryã§ã¯ãããAjaxï½gihyo.jp ⦠æè¡è©è«ç¤¾ YouTube Data APIã§åå¾å¯è½ãªãã£ã¼ãï½YouTubeAPIï½é³å£°ã»åç»é ä¿¡
ã¢ããªã±ã¼ã·ã§ã³ãå®è¡ãã¦ããã¹ããã®ç»é¢ãµã¤ãºãåããåçã«åå¾ã§ããã°ãããã«å¿ãã¦è¡¨ç¤ºããã³ã³ãã³ãã調æ´ã§ãã¾ãããã ç»é¢ãµã¤ãºãåå¾ãã JavaScriptã§ç»é¢ãµã¤ãºãåå¾ããããã®ããããã£ãç¨æããã¦ãã¾ãã ã¦ã£ã³ãã¦ãµã¤ãºãåå¾ã§ããé¢æ° screen.width document.write(screen.width); ç»é¢ã®å¹ ãåå¾ãããã¨ãåºæ¥ã¾ãã screen.height document.write(screen.height); ç»é¢ã®é«ããåå¾ãããã¨ãåºæ¥ã¾ãã ç»é¢ãµã¤ãºã¨ã¿ã¹ã¯ãã¼ãé¤ããã¹ã¯ãªã¼ã³ãµã¤ãºãåå¾ãããã¨ãåºæ¥ã¾ãã ã³ã³ãã³ãé åãåå¾ã§ããé¢æ° window.innerWidth document.write(window.innerWidth); ã¦ã£ã³ãã¦å å´ã®æ¨ªå¹ ããåå¾ãããå ´åã«ä½¿ç¨ã â» ã¹ã¯ãã¼ã«ãã¼é åãå«
ã¤ã³ãããã¯ã·ã§ã³ ããã·ã¥(#)ã URL ã«ä»ä¸ãã¦ãWeb ãã¼ã¸å ã®ç¹å®ã®ã¢ã³ã«ã¼ã«ã¸ã£ã³ãããããã«ãããã¨ãã§ãã¾ãã ããã¯é常ã«ä¾¿å©ãªæ©è½ã§ãããç¾å¨è¡¨ç¤ºãã¦ãã Web ãã¼ã¸ã® URL ãåºã«ãJavaScript ãªã©ã§ä½ããã®å¦çãè¡ãå ´åã«ã¯ããã® URL ã®ããã·ã¥(#)ãèæ ®ãã¦ããªãã¨å°ã£ããã¨ãèµ·ãã£ãããã¾ãã URL ã«ããã·ã¥(#)ãä»ä¸ããã¦ããã¨ãåãWebãã¼ã¸ã示ãã¦ããURLãªã®ã«ãåç´ãªæååæ¯è¼ã§ã¯å¥ã® Web ãã¼ã¸ã®ããã«è¦ãã¦ãã¾ãããã§ãã ä»åã¯ãç¾å¨ãã©ã¦ã¶ã§è¡¨ç¤ºãã¦ãã Web ãã¼ã¸ã® URL ã«ããã·ã¥ã(#)ãä»ä¸ããã¦ããå ´åã§ããããã·ã¥(#)ãå«ã¾ãªã URL ãåå¾ã§ããæ¹æ³ã«ã¤ãã¦èãã¦ã¿ããã¨ã«ãã¾ãã
WordPress ã§ã¢ãããã¼ãããç»åã¯ããããã¼ç»åãå«ãã¦ãã¡ãã£ã¢ãâãã©ã¤ãã©ãªãã§ä¸å 管çããã¦ãã¦ãç»åã«é¢ãããã¼ã¿ã¯æ稿è¨äºã¨åãããã«ã«ã¼ãã使ç¨ãã¦åå¾ãããã¨ãã§ããã è¨äºæ¬æã«ãç»åãæ¿å ¥ãããªãã¦ããæ稿ï¼åºå®ãã¼ã¸ï¼ç»é¢ããç»åãã¢ãããã¼ãããæç¹ã§ãã¡ãã£ã¢ã©ã¤ãã©ãªã«ç¾å¨ã®è¨äºã®åè¨äºã¨ãã¦æ·»ä»ã¡ãã£ã¢ãã¡ã¤ã«ã対å¿ããã è¨äºã®æ·»ä»ã¡ãã£ã¢ãã¡ã¤ã«ãåºåããï¼get_childrenï¼ get_children ãã³ãã¬ã¼ãã¿ã°ã§åè¨äºã¨ãã¦ã¡ãã£ã¢ãã¡ã¤ã«ãåå¾ããåå¾ããè¤æ°æã®ç»åãã¡ã¤ã«ã®ã¿ã¤ãã«ãç»åã説æã foreach ã«ãã£ã¦ã«ã¼ããããå ¨ã¦ã®æ·»ä»ã¡ãã£ã¢ãåºåãããä¾ã <?php while(have_posts()): the_post(); ?> <h1><?php the_title(); ?></h1> <?php t
è¦ç´ ã®å¹ ãåå¾ãããæã«ãjQueryã§ã¯width()ã§ãã®è¦ç´ ã®å¹ ãåå¾ãããã¨ãã§ãã¾ããï¼æã¨å ´åã«ãã£ã¦ã¯ãouterWidth()ãinnerWidth()ã使ãã¾ããï¼ ä¾ãã°ã§ãããä¸è¨å³ã®ãããªãããã¯ãã¹ã®ãªã¹ãï¼liè¦ç´ ã§ãã¼ã¯ã¢ããããå ´åï¼ã®å¹ ãåå¾ãããå ´åã«ã¯ä¸è¨ã®ããã«æ¸ãã¾ãã jQuery(function($) { $("#topic-path li").width(); }); ããããwidth()ã¯è©²å½ããè¦ç´ ã®æåã«ãããããè¦ç´ ã®å¹ ããåå¾ãããã§ãã¾ããããªã®ã§ãä¸çªæåã®ããã¼ã ãã¨æ¸ããã¦ããè¦ç´ ããåå¾ãããã¨ãã§ãã¾ããã ããã§ããã¹ã¦ã®å¹ ãåå¾ããããã«ã¯ä»¥ä¸ã®ãã¨ãè¡ãã¾ãã åå¾ããå¹ ãµã¤ãºãæ ¼ç´ããããã«é åãä½ã å¹ åå¾ã®ããã«ç¹°ãè¿ãå¦ç åå¾ããå¹ ãµã¤ãºãé åã«å ãã åå¾ããå¹ ãµã¤ãºãæ ¼ç´ããããã«é åãä½ã åå¾
ã©ã³ãã³ã°
ã¡ã³ããã³ã¹
ãç¥ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}