{"action":"created","issue":{"url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/163","repository_url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker","labels_url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/163/comments","events_url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/163/events","html_url":"https://github.com/mjolnic/bootstrap-colorpicker/issues/163","id":162274699,"number":163,"title":"Automatically create color picker","user":{"login":"onigetoc","id":47570,"avatar_url":"https://avatars.githubusercontent.com/u/47570?v=3","gravatar_id":"","url":"https://api.github.com/users/onigetoc","html_url":"https://github.com/onigetoc","followers_url":"https://api.github.com/users/onigetoc/followers","following_url":"https://api.github.com/users/onigetoc/following{/other_user}","gists_url":"https://api.github.com/users/onigetoc/gists{/gist_id}","starred_url":"https://api.github.com/users/onigetoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onigetoc/subscriptions","organizations_url":"https://api.github.com/users/onigetoc/orgs","repos_url":"https://api.github.com/users/onigetoc/repos","events_url":"https://api.github.com/users/onigetoc/events{/privacy}","received_events_url":"https://api.github.com/users/onigetoc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-25T10:23:38Z","updated_at":"2016-07-25T12:55:35Z","closed_at":"2016-07-25T12:55:35Z","body":"a suggestion to automatically create color picker. with this html input only:\r\n`<input type=\"color\" name=\"color1\" class=\"form-control\" value=\"rgba(0,0,0,0.4)\">`\r\n\r\n> Methode 1\r\n\r\n```\r\n$(function() {\r\n    $('input[type=\"color\"]').wrap('<div class=\"bs-colorpicker input-group colorpicker-component\"></div>').attr(\"type\", \"text\").after('<span class=\"input-group-addon\"><i></i></span>');\r\n\r\n  $('.bs-colorpicker').colorpicker();\r\n});\r\n```\r\n\r\n> Method 2 with unique ID\r\n```\r\n$(function() {\r\n  $('input[type=\"color\"]').each(function(i) {\r\n    $(this).wrapAll('<div id=\"bs-colorpicker-' + i + '\" class=\"bs-colorpicker input-group colorpicker-component\"></div>').attr(\"type\", \"text\").after('<span class=\"input-group-addon\"><i></i></span>');\r\n  });\r\n  $('.bs-colorpicker').colorpicker();\r\n});\r\n```\r\n\r\nI did a working demo here with the 2 example: \r\nhttp://jsfiddle.net/onigetoc/9qkjh6h2/"},"comment":{"url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/comments/234945034","html_url":"https://github.com/mjolnic/bootstrap-colorpicker/issues/163#issuecomment-234945034","issue_url":"https://api.github.com/repos/mjolnic/bootstrap-colorpicker/issues/163","id":234945034,"user":{"login":"mjolnic","id":122741,"avatar_url":"https://avatars.githubusercontent.com/u/122741?v=3","gravatar_id":"","url":"https://api.github.com/users/mjolnic","html_url":"https://github.com/mjolnic","followers_url":"https://api.github.com/users/mjolnic/followers","following_url":"https://api.github.com/users/mjolnic/following{/other_user}","gists_url":"https://api.github.com/users/mjolnic/gists{/gist_id}","starred_url":"https://api.github.com/users/mjolnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjolnic/subscriptions","organizations_url":"https://api.github.com/users/mjolnic/orgs","repos_url":"https://api.github.com/users/mjolnic/repos","events_url":"https://api.github.com/users/mjolnic/events{/privacy}","received_events_url":"https://api.github.com/users/mjolnic/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T12:55:35Z","updated_at":"2016-07-25T12:55:35Z","body":"Thanks but that's an implementation detail, it may not fit into everybody's needs.\r\n\r\nPlease use only the Issues section for reporting real bugs or real feature requests."}}
{"actor":{"display_login":"mjolnic"}}