WordPressã§javascriptã追å ããã«ã¹ã¿ãã¤ãºããããã ãã©ãä»åã¯jQueryã§è¡ããã¨ã«ãããprototypeã¨ãjQueryã¯ããã©ã«ã㧠wp-include/js ã«ç¨æãã¦ããã¦ããã®ã§ããªã³ã¯ã¨ã³ã¼ããæ¸ãã ãã§æ¸ãã¯ããªãã ãã©ããªããåä½ããªããæ¸ãã¦ããã³ã¼ãã¯æ¬å®¶çjQueryã使ç¨ãããã¹ãã§åãã¦ããã®ã§ãè¨è¿°ãã¹ã¨ãã§ã¯ãªãã¨æãããã jQuery.noConflict(); wp-include/jsãå ããjQuery.noConflict();ãã§æ¤ç´¢ãã¦ã¿ãã¨ãjquery.js ãããããããjQuery.noConflict();ã¯è¤æ°ã©ã¤ãã©ãªã®ä½¿ç¨æã«$objectå士ã®ã³ã³ããªã¯ããåé¿ãã¦ããããã ãã©ããã®å ´åã$objectãã§ã¯ãªããjQueryãã¨è¨è¿°ããªãã¡ããããªãã å ã®ã½ã¼ã¹ããããªæãã§æ¸ãã¦ããå ´å
ã³ãªã¹ãããä½æããããã¼ã¸ã®å é ãä»»æã®è¦ç´ ã«ãã¹ã ã¼ãºã«ã¹ã¯ãã¼ã«ããããã¨ãã§ããã¹ã¯ãªãããPage Scrollerããå ¥ãã¦ã¿ã¾ããããã¼ã¸ã®å³ä¸ã®æ¹ã«ãããâtoTopããã¯ãªãã¯ãã¦ã¿ã¦ãã ãããã¹ã ã¼ãºã«ãã¼ã¸ä¸é¨ã¸ã¹ã¯ãã¼ã«ããã¯ãã§ãã ã§ããã®ã¹ã¯ãªãããå®è£ ããã¨ãã«ä½¿ã£ãã®ãwp_enqueue_script();ã¨è¨ãWordPressã®ã¢ã¯ã·ã§ã³ããã¯ãVer. 2.1ããå°å ¥ãããã¿ãããªãã ãã©ããã©ã°ã¤ã³åãã®é¢æ°ã¨è¨ããã¨ããã£ã¦ããã®åå¨ããå ¨ç¶ç¥ãã¾ããã§ããï¼æ±ï¼ wp_enqueue_scriptã¨ã¯ ä½ãããããã¯ãã¨è¨ãã¨ãå¤é¨åç §ã®ã¹ã¯ãªãããï¼ éè¤ããªãããã« é©åãªé çªã§ èªã¿è¾¼ãããã«èªåçã«èª¿ç¯ãã¦ãããããã¯ã§ãããªããããªã®ãå¿ è¦ãã¨è¨ãã¨ãæè¿ã®ãã©ã°ã¤ã³ãWPã³ã¢ã®æ©è½ã«ããã¦ãjQueryãscript.aculo.
WordPress ã§ãå¤é¨ JavaScript ãèªã¿è¾¼ããã©ã°ã¤ã³ãä½æããéã"wp-head" ãããã¯ã㦠<head> å ã«æ¸ãè¾¼ããã¨ã¯è¯ãããã¨æãã ãã ãããã 㨠jQuery ãã prototype.js ããã®ã©ã¤ãã©ãªãå¿ è¦ãªãã©ã°ã¤ã³ãè¤æ°ã¢ã¯ãã£ãã«ããå ´åãåãã©ã¤ãã©ãªãè¤æ°èªã¿è¾¼ãã§ãã¾ããã¨ã«ãªãã ããããããããã®ãã©ã°ã¤ã³ãèªã¿è¾¼ãã§ããã©ã¤ãã©ãªã®ãã¼ã¸ã§ã³ãéãã¨ç®ãå½ã¦ãããªãã ã§ããããªæ··ä¹±ãé¿ããããã« WordPress 2.1 ããå°å ¥ãããã®ã wp_enqueue_script() é¢æ°ãªã©ã®ä¸é£ã®é¢æ°ç¾¤ã¨ "wp_print_scripts" ã¨è¨ãã¢ã¯ã·ã§ã³ããã¯ã ãããã使ãã°ãJavaScript ã©ã¤ãã©ãªã®ãã¼ãã¯ç°¡åã«ãªãã 以ä¸ã使ç¨æ¹æ³ãç°¡åã«ã wp_enqueue_script( $handle,
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}