{"action":"created","issue":{"url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/605","repository_url":"https://api.github.com/repos/silviomoreto/bootstrap-select","labels_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/605/comments","events_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/605/events","html_url":"https://github.com/silviomoreto/bootstrap-select/issues/605","id":34228228,"number":605,"title":"bootstrap-select not working when .clone(true) in jQuery","user":{"login":"rougin","id":6078637,"avatar_url":"https://avatars.githubusercontent.com/u/6078637?v=3","gravatar_id":"","url":"https://api.github.com/users/rougin","html_url":"https://github.com/rougin","followers_url":"https://api.github.com/users/rougin/followers","following_url":"https://api.github.com/users/rougin/following{/other_user}","gists_url":"https://api.github.com/users/rougin/gists{/gist_id}","starred_url":"https://api.github.com/users/rougin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rougin/subscriptions","organizations_url":"https://api.github.com/users/rougin/orgs","repos_url":"https://api.github.com/users/rougin/repos","events_url":"https://api.github.com/users/rougin/events{/privacy}","received_events_url":"https://api.github.com/users/rougin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-05-24T07:34:26Z","updated_at":"2016-03-05T02:49:57Z","closed_at":"2014-06-01T03:21:59Z","body":"Does bootstrap-select really support cloning? I've followed some snippets found in https://github.com/silviomoreto/bootstrap-select/issues/157 and still it doesn't work. I've tried to include \"true\" in .clone() but it turns out that it will only affects the events of the original.\r\n\r\nHere's the code. Let's assume that the id \"packing\" is a div containing input text boxes and a select. I want to prepend/append the clone to a div.\r\n```\r\n$('select').attr('data-live-search', 'true');\r\n$('select').attr('data-style', 'form-control');\r\n$('select').selectpicker();\r\nfunction addformfield() {\r\n        counter += 1;\r\n        var packing = $('#packing');\r\n        var clone = packing.clone();\r\n        clone.prependTo('#product_field');\r\n        clone.attr('id', 'packing_' + counter);\r\n        $('select').selectpicker('refresh');\r\n}\r\n```\r\n\r\nHere's also the JSFiddle: http://jsfiddle.net/rougin/N663T/2/"},"comment":{"url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/comments/192555332","html_url":"https://github.com/silviomoreto/bootstrap-select/issues/605#issuecomment-192555332","issue_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/605","id":192555332,"user":{"login":"John-Han","id":9800818,"avatar_url":"https://avatars.githubusercontent.com/u/9800818?v=3","gravatar_id":"","url":"https://api.github.com/users/John-Han","html_url":"https://github.com/John-Han","followers_url":"https://api.github.com/users/John-Han/followers","following_url":"https://api.github.com/users/John-Han/following{/other_user}","gists_url":"https://api.github.com/users/John-Han/gists{/gist_id}","starred_url":"https://api.github.com/users/John-Han/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/John-Han/subscriptions","organizations_url":"https://api.github.com/users/John-Han/orgs","repos_url":"https://api.github.com/users/John-Han/repos","events_url":"https://api.github.com/users/John-Han/events{/privacy}","received_events_url":"https://api.github.com/users/John-Han/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T02:49:57Z","updated_at":"2016-03-05T02:49:57Z","body":"Use:`clone.find('.bootstrap-select').replaceWith(function() { return $('select', this); });` is useful ,thank you, @joejordanbrown "}}