Updated 2014.02.16 / Published 2014.02.16 jQueryã§data-*å±æ§ãæ±ãéã«jQuery.data()ã¡ã½ãããããã¯jQuery.attr()ã¡ã½ããã使ããã¨ã«ãªãã§ãããããjQueryã§æ±ããdata-*å±æ§ã®ãªãã¸ã§ã¯ãã¯åæã¨ãã¦ãã£ãã·ã¥ä»æ§ã§ãããã¨ãç解ãã¦ãããªãã¨åµããã¨ãå¤ã ããã¾ãã åå¾ã ããªãåé¡ã¯èµ·ãããªã <div id="user1" data-id="1" data-user="Jack" data-date-of-birth="2000-10-01">Jack</div> ãããã®data-*å±æ§ãåå¾ãããå ´åãjQueryã§ããã°æ¬¡ã®ããã«è¨è¿°ãã¾ãã //data()ã®å ´å jQuery("#user1").data("id"); // => 1 (æ°åæ±ã) jQuery("#user1").d
{{#tags}}- {{label}}
{{/tags}}