{"id":1385,"date":"2016-06-15T21:34:12","date_gmt":"2016-06-15T12:34:12","guid":{"rendered":"http:\/\/www.clarenet.co.jp\/column\/engineer\/?p=159"},"modified":"2016-06-15T21:34:12","modified_gmt":"2016-06-15T12:34:12","slug":"jquery%e3%81%a7%e3%82%b9%e3%83%a0%e3%83%bc%e3%82%ba%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/4koma-web.com\/coding\/jquery%e3%81%a7%e3%82%b9%e3%83%a0%e3%83%bc%e3%82%ba%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab\/","title":{"rendered":"JQuery\u3067\u30b9\u30e0\u30fc\u30ba\u30b9\u30af\u30ed\u30fc\u30eb"},"content":{"rendered":"<p>\u4eca\u56de\u306fJQuery\u3067\u30b9\u30e0\u30fc\u30ba\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u8868\u73fe\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n<p>\u901a\u5e38\u3001\u30da\u30fc\u30b8\u5185\u30ea\u30f3\u30af\u3092\u3059\u308b\u5834\u5408<\/p>\n<pre class=\"lang:default decode:true \" > &lt;div id=\"link\"&gt;&lt;\/div&gt;<\/pre>\n<p>\u3068\u3044\u3046ID\u306b<\/p>\n<pre class=\"lang:default decode:true \" >&lt;a href=\"#link\"&gt;&lt;\/a&gt;\n<\/pre>\n<p>\u3068\u3044\u3046\u30ea\u30f3\u30af\u3092\u6307\u5b9a\u3057\u3066\u30da\u30fc\u30b8\u5185\u306e\u79fb\u52d5\u3092\u6307\u5b9a\u3059\u308b\u306e\u3067\u3059\u304c\u3002<\/p>\n<p>\u3053\u306e\u72b6\u614b\u306e\u307e\u307e\u3060\u3068\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306e\u52d5\u304d\u304c\u6025\u306a\u306e\u3067\u898b\u3065\u3089\u304f\u3001\u30da\u30fc\u30b8\u3092\u898b\u3066\u3044\u308b\u5074\u306b\u5bfe\u3057\u3066\u512a\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u305d\u308c\u306b\u5bfe\u3057\u3066jQuery\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u3063\u3066\u4e0b\u306b\u6d41\u308c\u308b\u3088\u3046\u306a\u30b9\u30e0\u30fc\u30ba\u306a\u30b9\u30af\u30ed\u30fc\u30eb\u8868\u73fe\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305ahead\u5185\u306bJQuery\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 <\/p>\n<pre class=\"lang:default decode:true \" >&lt;script type=\"text\/javascript\" src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.3.2\/jquery.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>\u305d\u306e\u76f4\u4e0b\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >&lt;script&gt;\n\/\/\u30b9\u30e0\u30fc\u30ba\u30b9\u30af\u30ed\u30fc\u30eb\njQuery(function(){\n   \/\/ #\u3067\u59cb\u307e\u308b\u30a2\u30f3\u30ab\u30fc\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u5834\u5408\u306b\u51e6\u7406\n   jQuery('a[href^=#]').click(function() {\n\t  \/\/ \u30b9\u30af\u30ed\u30fc\u30eb\u306e\u901f\u5ea6\n\t  var speed = 500; \/\/ \u30df\u30ea\u79d2\n\t  \/\/ \u30a2\u30f3\u30ab\u30fc\u306e\u5024\u53d6\u5f97\n\t  var href= jQuery(this).attr(\"href\");\n\t  \/\/ \u79fb\u52d5\u5148\u3092\u53d6\u5f97\n\t  var target = jQuery(href == \"#\" || href == \"\" ? 'html' : href);\n\t  \/\/ \u79fb\u52d5\u5148\u3092\u6570\u5024\u3067\u53d6\u5f97\n\t  var position = target.offset().top;\n\t  \/\/ \u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\n\t  jQuery('body,html').animate({scrollTop:position}, speed, 'swing');\n\t  return false;\n   });\n});\n&lt;\/script&gt;<\/pre>\n<p>\u3053\u308c\u3067\u5b8c\u6210\u3067\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u7b87\u6240<\/p>\n<pre class=\"lang:default decode:true \" >\/\/ \u30b9\u30af\u30ed\u30fc\u30eb\u306e\u901f\u5ea6\n\t  var speed = 500; \/\/ \u30df\u30ea\u79d2<\/pre>\n<p>\u95a2\u6570\u300cspeed\u300d\u5185\u306e\u6570\u5b57\u3092\u5909\u3048\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u30b9\u30af\u30ed\u30fc\u30eb\u901f\u5ea6\u3092\u5909\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fJQuery\u3067\u30b9\u30e0\u30fc\u30ba\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u8868\u73fe\u306b\u3064\u3044\u3066\u3067\u3059\u3002 \u901a\u5e38\u3001\u30da\u30fc\u30b8\u5185\u30ea\u30f3\u30af\u3092\u3059\u308b\u5834\u5408 &lt;div id=&#8221;link&#8221;&gt;&lt;\/div&gt; \u3068\u3044\u3046ID\u306b &lt;a href=&#8221;#link&#8221;&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[1],"tags":[],"publishpress_future_action":{"enabled":false,"date":"2026-05-09 17:15:23","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1385"}],"collection":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/comments?post=1385"}],"version-history":[{"count":0,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1385\/revisions"}],"wp:attachment":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media?parent=1385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/categories?post=1385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/tags?post=1385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}