{"id":2698,"date":"2013-10-21T16:18:30","date_gmt":"2013-10-21T07:18:30","guid":{"rendered":"http:\/\/apr20.net\/?p=2698"},"modified":"2013-10-21T16:18:30","modified_gmt":"2013-10-21T07:18:30","slug":"jquery-raty%e3%81%a7%e3%83%ac%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%ef%bc%88%e8%a9%95%e4%be%a1%ef%bc%89","status":"publish","type":"post","link":"https:\/\/apr20.net\/?p=2698","title":{"rendered":"jQuery Raty\u3067\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\uff08\u8a55\u4fa1\uff09\u8868\u793a"},"content":{"rendered":"<p>\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3084\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u306a\u3093\u304b\u306b\u30b9\u30bf\u30fc\u8a55\u4fa1\u3092\u8868\u793a\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001jQuery Raty\u3067\u7c21\u5358\u306b\u8a2d\u5b9a\u51fa\u6765\u307e\u3059\u3002<br \/>\n<br \/><i class=\"icon-book\"><\/i> <small><a href=\"http:\/\/wbotelhos.com\/raty\" target=\"_blank\"><strong>jQuery Raty<\/strong> &#8211; A Star Rating Plugin<\/a><\/small><\/p>\n<h3>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n<p><a href=\"http:\/\/apr20.net\/wp-content\/uploads\/2013\/10\/cbf0ed0f2876c40d1c8518809acdf2e0.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/apr20.net\/wp-content\/uploads\/2013\/10\/cbf0ed0f2876c40d1c8518809acdf2e0.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-10-21 16.35.27\" width=\"166\" height=\"77\" class=\"alignnone size-full wp-image-2732 fancybox img-rounded\" \/><\/a><\/p>\n<p>\u307e\u305a\u306f\u3001\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd\u3057\u3066\u3001jquery.raty.min.js\u3068img\u30d5\u30a9\u30eb\u30c0\uff08\u661f\u306e\u753b\u50cf\uff09\u3092\u4efb\u610f\u306e\u5834\u6240\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n<br \/><i class=\"icon-download\"><\/i> <small><a href=\"https:\/\/github.com\/wbotelhos\/raty\" target=\"_blank\">Raty on Github<\/a><\/small>\n<\/p>\n<h3>\u30d8\u30c3\u30c0\u30fc\u3067js\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u8a2d\u5b9a<\/h3>\n<p>jQuery\u30d5\u30a1\u30a4\u30eb\u3068raty\u306ejs\u30d5\u30a1\u30a4\u30eb\u3092\u30d8\u30c3\u30c0\u30fc\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p><strong>jQuery\u8aad\u307f\u8fbc\u307f<\/strong><br \/>\n[php]&lt;script type=&quot;text\/javascript&quot; src=&quot;\/js\/jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;[\/php]<br \/>\n<strong>Raty\u8aad\u307f\u8fbc\u307f<\/strong><br \/>\n[php]&lt;script type=&quot;text\/javascript&quot; src=&quot;\/js\/jquery.raty.min.js&quot;&gt;&lt;\/script&gt;[\/php]<\/p>\n<p><strong>Raty\u306e\u8a2d\u5b9a<\/strong><br \/>\n<br \/>\u3053\u306e\u5834\u5408\u306f\u3001Raty\u3092\u8a2d\u7f6e\u3057\u305f\u7b87\u6240\u306b\u30b9\u30b3\u30a23\u306a\u306e\u3067\u3001\u661f\u304c3\u3064\u3060\u3051\u8272\u3065\u3044\u305f\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/apr20.net\/wp-content\/uploads\/2013\/10\/49b7b68ca9532a2d2f47cf68963a4ece.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/apr20.net\/wp-content\/uploads\/2013\/10\/49b7b68ca9532a2d2f47cf68963a4ece.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-10-21 16.48.23\" width=\"110\" height=\"32\" class=\"alignnone size-full wp-image-2736 fancybox img-rounded\" \/><\/a><\/p>\n<p>[php]<br \/>\n&lt;script type=&quot;text\/javascript&quot;&gt;<br \/>\n    $(&#8216;#star&#8217;).raty({ score: 3 });<br \/>\n&lt;\/script&gt;<br \/>\n[\/php]<\/p>\n<h3>\u8868\u793a\u3057\u305f\u3044\u5834\u6240\u306b\u30b3\u30fc\u30c9\u3092\u8a2d\u7f6e<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u8a2d\u7f6e\u3057\u305f\u3044\u5834\u6240\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>[html]&lt;div id=&quot;star&quot;&gt;&lt;\/div&gt;[\/html]<\/p>\n<hr>\n<h2>\u8907\u6570\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u3001\u52d5\u7684\u8868\u793a<\/h2>\n<p>\u30da\u30fc\u30b8\u5185\u306b\u8907\u6570\u306e\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u8868\u793a\u3092\u3057\u305f\u3044\u5834\u5408\u3084\u3001PHP\u306a\u3069\u3067\u52d5\u7684\u306b\u8868\u793a\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u30b9\u30b3\u30a2\u3092HTML\u5074\u3067\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3084\u308c\u3070\u7c21\u5358\u3067\u3059\u3002<\/p>\n<p><strong>read only\u3001\u30b5\u30fc\u30d0\u4e0a\u306e\u753b\u50cf\u306e\u30d1\u30b9\u306f\u4efb\u610f\u3001\u30b9\u30b3\u30a2\u3092\u52d5\u7684\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408<\/strong><br \/>\n[php]&lt;script type=&quot;text\/javascript&quot;&gt;<br \/>\n\t$(function() {<br \/>\n\t\t\t$(&#8216;#star&#8217;).raty( {<br \/>\n\t\t\t readOnly: true,   \/\/\u95b2\u89a7\u8005\u306b\u3088\u308b\u30b9\u30b3\u30a2\u306e\u5909\u66f4\u4e0d\u53ef<br \/>\n\t\t\t score: function() {<br \/>\n\t\t\t    return $(this).attr(&#8216;data-score&#8217;);<br \/>\n\t\t\t },<br \/>\n\t\t\t path:  &#8216;http:\/\/your-server.com\/img\/&#8217; \/\/\u30b5\u30fc\u30d0\u4e0a\u306eRaty\u753b\u50cf\u306e\u30d1\u30b9<br \/>\n});<br \/>\n\t\t});<br \/>\n&lt;\/script&gt;[\/php]<\/p>\n<h3>\u8868\u793a\u3055\u305b\u305f\u3044\u5834\u6240\u306b\u8a2d\u7f6e<\/h3>\n<p>[php]<br \/>\n&lt;div id=&quot;star&quot; data-score=&quot;&lt;?php echo $score1 ;?&gt;&quot;&gt;&lt;\/div&gt;<br \/>\n&lt;div id=&quot;star&quot; data-score=&quot;&lt;?php echo $score2 ;?&gt;&quot;&gt;&lt;\/div&gt;<br \/>\n&lt;div id=&quot;star&quot; data-score=&quot;&lt;?php echo $score3 ;?&gt;&quot;&gt;&lt;\/div&gt;<br \/>\n[\/php]<\/p>\n<p>\u30b3\u30fc\u30c9\u5185\u306b\u3082\u8aac\u660e\u304c\u3042\u308a\u307e\u3059\u304c\u3001readOnly\u3092true\u306b\u3059\u308b\u3068\u95b2\u89a7\u30e2\u30fc\u30c9\uff08\u6295\u7968\u6a5f\u80fd\u306a\u3057\uff09\u3001score\u306e\u8a2d\u5b9a\u306f\u3001HTML\u5074\u306edata-score\u306e\u5024\uff08$score1,$score2,$score3\uff09\u3067\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b9\u30b3\u30a2\u306e\u8a2d\u5b9a\u3001path\u306e\u9805\u76ee\u3067\u661f\u753b\u50cf\u306e\u30d1\u30b9\u8a2d\u5b9a\u3001\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3059\u3002\u3053\u308c\u306a\u3089\u3001PHP\u3067\u52d5\u7684\u306b\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u8868\u793a\u3055\u305b\u308b\u306e\u3082\u7c21\u5358\u306b\u5b9f\u88c5\u51fa\u6765\u307e\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3084\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u306a\u3093\u304b\u306b\u30b9\u30bf\u30fc\u8a55\u4fa1\u3092\u8868\u793a\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001jQuery &#8230;<\/p>\n","protected":false},"author":1,"featured_media":2724,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,14,5],"tags":[],"class_list":["post-2698","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","category-php","category-wordpress-web-category"],"_links":{"self":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/2698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2698"}],"version-history":[{"count":0,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/2698\/revisions"}],"wp:attachment":[{"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}