{"id":122,"date":"2010-05-17T21:22:43","date_gmt":"2010-05-17T12:22:43","guid":{"rendered":"http:\/\/picxpic.com\/?p=122"},"modified":"2010-05-17T21:22:43","modified_gmt":"2010-05-17T12:22:43","slug":"%e3%80%90javascript%e3%80%91jquery%e3%82%92%e3%81%a4%e3%81%8b%e3%81%a3%e3%81%9f%e4%b8%80%e5%ae%9a%e6%99%82%e9%96%93%e3%81%a7%e7%94%bb%e5%83%8f%e3%82%92%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88%e3%82%8b","status":"publish","type":"post","link":"https:\/\/picxpic.com\/?p=122","title":{"rendered":"\u3010Javascript\u3011jQuery\u3092\u3064\u304b\u3063\u305f\u4e00\u5b9a\u6642\u9593\u3067\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u30d5\u30a7\u30fc\u30c9\u30a4\u30f3\uff09"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-12\" title=\"010248-3d-glossy-blue-orb-icon-animals-animal-hippo3-sc22\" src=\"https:\/\/picxpic.com\/wp-content\/uploads\/2010\/05\/010248-3d-glossy-blue-orb-icon-animals-animal-hippo3-sc22.jpg\" alt=\"\" width=\"100\" height=\"100\" \/>\u4e00\u5b9a\u6642\u9593\u304c\u305f\u3064\u3068\u753b\u50cf\u304c\u5207\u308a\u66ff\u3048\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3054\u3056\u3044\u307e\u3059\u3002jQuery\u3064\u304b\u3063\u3066\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/picxpic.com\/sample\/20100517timeChangeGallery\" target=\"_blank\" rel=\"noopener\">\u30b5\u30f3\u30d7\u30eb\u30c7\u30e2\u306f\u3053\u3061\u3089\u3067\u3059\u3002<\/a><br \/>\n<a href=\"https:\/\/picxpic.com\/sample\/\/20100517timeChangeGallery.zip\" target=\"_blank\" rel=\"noopener\">\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089\u304b\u3089\u3002<\/a><\/p>\n<p>\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30b9\u30d4\u30fc\u30c9\u306a\u3069\u306f\u7c21\u5358\u306b\u5909\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u30b9\u30d4\u30fc\u30c9\u306e\u3068\u3053\u306e3000\u3068\u3044\u3046\u306e\u306f3\u79d2\u306e\u3053\u3068\u30021\u79d2\u306f1000\u3067\u3059\u3002<\/p>\n<p>\u753b\u50cf\u3092&lt;p id=&#8221;gallery&#8221;&gt;\u3068\u304b\u3067\u56f2\u3081\u3070\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u5207\u308a\u66ff\u3048\u308b\u753b\u50cf\u306e\u6570\u3082\u62e1\u5f35\u5b50\u3082\u81ea\u7531\u306b\u5909\u3048\u308c\u308b\u3051\u308c\u3069\u3001\u753b\u50cf\u306e\u540d\u524d\u306f1.jpg\u3068\u304b2.png\u3068\u304b\u30011\u30012\u30013\u3068\u304b\u306e\u9023\u756a\u3067\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u3002<\/p>\n<p>[html]<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot; \/&gt;<br \/>\n&lt;title&gt;\u7121\u984c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8&lt;\/title&gt;<br \/>\n&lt;script src=&quot;js\/jquery.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&quot;js\/loading.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;div&gt;<br \/>\n\t&lt;p id=&quot;gallery&quot;&gt;&lt;img src=&quot;img\/1.jpg&quot; \/&gt;&lt;\/p&gt;<br \/>\n&lt;\/div&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>[js]<br \/>\n\/\/\u753b\u50cf\u306e\u6570<br \/>\nimgLength = 3;<\/p>\n<p>\/\/\u6700\u521d\u306b\u8868\u793a\u3059\u308b\u753b\u50cf<br \/>\nfirstInt = 1;<\/p>\n<p>\/\/\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u901f\u3055<br \/>\nimgChangeSpeed = 3000;<\/p>\n<p>\/\/\u753b\u50cf\u306e\u62e1\u5f35\u5b50<br \/>\nimgExtension = &quot;.jpg&quot;;<\/p>\n<p>\/\/\u753b\u50cf\u306e\u4fdd\u5b58\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<br \/>\nimgDirectory = &quot;img\/&quot;;<\/p>\n<p>randomInt = firstInt + 1;<\/p>\n<p>$(function(){<\/p>\n<p>\t\/\/\u4e00\u5b9a\u6642\u9593\u6bce\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3059<br \/>\n\tvar t = setInterval(loadImg, imgChangeSpeed);<\/p>\n<p>\t\/\/\u547c\u3073\u51fa\u3055\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8<br \/>\n\tfunction loadImg(){<\/p>\n<p>\t\t$(&quot;#gallery&quot;).children(&quot;img&quot;).animate({&#8216;opacity&#8217;:&#8217;0&#8242;},\t0)<br \/>\n\t\t$(&quot;#gallery&quot;).children(&quot;img&quot;).attr(&quot;src&quot;,function(){ return imgDirectory + randomInt + imgExtension }).animate({&#8216;opacity&#8217;:&#8217;1&#8242;},\t800);<\/p>\n<p>\t\tif(randomInt &lt; imgLength){<br \/>\n\t\t\trandomInt = parseInt(randomInt) + 1;<br \/>\n\t\t}<br \/>\n\t\telse{<br \/>\n\t\t\trandomInt = 1;<br \/>\n\t\t}<br \/>\n\t}<br \/>\n});<br \/>\n[\/js]<\/p>\n<p>\u307b\u3093\u3068\u306f\u306d\u3001\u307b\u3093\u3068\u306f\u753b\u50cf\u3092\u30af\u30ed\u30b9\u30d5\u30a7\u30fc\u30c9\uff08\u306a\u3093\u304b\u6eb6\u3051\u8fbc\u3080\u3088\u3046\u306b\u5909\u308f\u3063\u3066\u304f\u3084\u3064\uff09\u3067\u5207\u308a\u66ff\u3048\u305f\u304b\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u3081\u3093\u3069\u304f\u3055\u304b\u3063\u305f\u304b\u3089\u5bdd\u3061\u3083\u3063\u305f\u3093\u3067\u3059\uff01<\/p>\n<p>\u3044\u3064\u304b\u305d\u308c\u3082\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f1a\u793e\u3067\u96a3\u306e\u5e2d\u306e\u5148\u8f29\u304c\u30b0\u30ed\u753b\u50cf\u3092\u559c\u3093\u3067\u898b\u305b\u3066\u304d\u307e\u3057\u305f\u3002\u305d\u306e\u305b\u3044\u3067\u3082\u3046\u50d5\u306e\u30b9\u30a3\u30fc\u30c8\u30cf\u30fc\u30c8\u306f\u30d6\u30ec\u30a4\u30ad\u30f3\u3060\u305c\uff01<\/p>\n<p>\u307b\u3093\u3068\u306f\u300c\u30a4\u30e4\u30fc\u30f3\uff01\u3053\u3093\u306a\u6016\u3044\u3082\u306e\u898b\u308c\u307e\u305b\u3093\u308f\u30fc\uff01\u300d\u3068\u304b\u8a00\u3044\u306a\u304c\u3089\u5b09\u3005\u3068\u3057\u3066\u898b\u3066\u3044\u305f\u3093\u3067\u3059\u3051\u308c\u3069\u3082\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5b9a\u6642\u9593\u304c\u305f\u3064\u3068\u753b\u50cf\u304c\u5207\u308a\u66ff\u3048\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3054\u3056\u3044\u307e\u3059\u3002jQuery\u3064\u304b\u3063\u3066\u307e\u3059\u3002 \u30b5\u30f3\u30d7\u30eb\u30c7\u30e2\u306f\u3053\u3061\u3089\u3067\u3059\u3002 \u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089\u304b\u3089\u3002 \u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30b9\u30d4\u30fc\u30c9\u306a\u3069\u306f\u7c21\u5358\u306b\u5909\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u30b9\u30d4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jinr_url_youtube":"","_jinr_pip_youtube":false,"_jinr_time_youtube":"","_jinr_thumb_youtube":"","_jinr_media_youtube":"","_jinr_category_edit":false,"_jinr_category":"","_jinr_title_display":false,"_jinr_snsbutton_display":false,"_jinr_ads_display":false,"_jinr_thumbnail_display":false,"_jinr_profile_display":false,"_jinr_representations_display":false,"_jinr_relatedpost_display":false,"_jinr_sidebar1col_display":false,"_jinr_sidebar2col_display":false,"_jinr_seotitle_display":"","_jinr_description_display":"","_jinr_keyword_display":"","_jinr_hastag_display":"","_jinr_canonical_display":"","_jinr_noindex_display":false,"_jinr_paidpost":false,"_jinr_paidpost_product_id":"","_jinr_headtag_article":"","footnotes":""},"categories":[6],"tags":[25],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-program","tag-jquery"],"views":"35","_links":{"self":[{"href":"https:\/\/picxpic.com\/index.php?rest_route=\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picxpic.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picxpic.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picxpic.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/picxpic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/picxpic.com\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/picxpic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picxpic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picxpic.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}