{"action":"opened","issue":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI/issues/3656","repository_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI","labels_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI/issues/3656/labels{/name}","comments_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI/issues/3656/comments","events_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI/issues/3656/events","html_url":"https://github.com/Semantic-Org/Semantic-UI/issues/3656","id":131609419,"number":3656,"title":"Option Add all","user":{"login":"brunokassss","id":6674596,"avatar_url":"https://avatars.githubusercontent.com/u/6674596?v=3","gravatar_id":"","url":"https://api.github.com/users/brunokassss","html_url":"https://github.com/brunokassss","followers_url":"https://api.github.com/users/brunokassss/followers","following_url":"https://api.github.com/users/brunokassss/following{/other_user}","gists_url":"https://api.github.com/users/brunokassss/gists{/gist_id}","starred_url":"https://api.github.com/users/brunokassss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunokassss/subscriptions","organizations_url":"https://api.github.com/users/brunokassss/orgs","repos_url":"https://api.github.com/users/brunokassss/repos","events_url":"https://api.github.com/users/brunokassss/events{/privacy}","received_events_url":"https://api.github.com/users/brunokassss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-05T10:42:35Z","updated_at":"2016-02-05T10:42:35Z","closed_at":null,"body":"Hi,\r\n\r\nThis is not an issue, it's more a solution, it's a option to select all elements.\r\n\r\n<h1>HTML file</h1>\r\n<p>Multiple Selection with selectAll Option</p>\r\n\r\n`<div class=\"clear dropdown example selectAll\">\r\n          <select name=\"skills\" multiple class=\"ui search dropdown\" >\r\n            <option value=\"all\">All</option>\r\n            <option value=\"AG\">Angular</option>\r\n            <option value=\"CSS\">CSS</option>\r\n            <option value=\"GD\">Graphic Design</option>\r\n            <option value=\"EM\">Ember</option>\r\n          </select>\r\n</div>`\r\n\r\n<br>\r\n<h1>Javascript file</h1>\r\n\r\n$(document).ready(function() {\r\n\r\n $('.selectAll .menu div:first').click(function(){\r\n\r\n      var todos= $('.selectAll .menu div:first').attr('data-value');\r\n      var select =  $('.selectAll select option');\r\n      var size = $(\".selectAll .ui.dropdown a.label\").length;\r\n      var result = new Array();\r\n      var i = 0;\r\n\r\n      select.each(function(){\r\n        result[i] = $(this).val();\r\n        i++;\r\n      });\r\n\r\n      if(todos==\"all\") {\r\n        if(size > 0){\r\n          $('.clear.example.selectAll .ui.dropdown').dropdown('clear');//Clean list\r\n        }\r\n          $('.clear.example.selectAll .ui.dropdown').dropdown('set selected', result);\r\n          $(\".selectAll .ui.dropdown a:first .delete.icon\").remove();//Remove icon\r\n          $(\".selectAll .ui.dropdown a.label\").not(':first').hide();//hide other elements  \r\n     }\r\n   });\r\n});\r\n"}}