{"action":"created","issue":{"url":"https://api.github.com/repos/leongersen/noUiSlider/issues/437","labels_url":"https://api.github.com/repos/leongersen/noUiSlider/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/leongersen/noUiSlider/issues/437/comments","events_url":"https://api.github.com/repos/leongersen/noUiSlider/issues/437/events","html_url":"https://github.com/leongersen/noUiSlider/issues/437","id":70676197,"number":437,"title":"Initialising sliders dynamically","user":{"login":"abtx","id":5509711,"avatar_url":"https://avatars.githubusercontent.com/u/5509711?v=3","gravatar_id":"","url":"https://api.github.com/users/abtx","html_url":"https://github.com/abtx","followers_url":"https://api.github.com/users/abtx/followers","following_url":"https://api.github.com/users/abtx/following{/other_user}","gists_url":"https://api.github.com/users/abtx/gists{/gist_id}","starred_url":"https://api.github.com/users/abtx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtx/subscriptions","organizations_url":"https://api.github.com/users/abtx/orgs","repos_url":"https://api.github.com/users/abtx/repos","events_url":"https://api.github.com/users/abtx/events{/privacy}","received_events_url":"https://api.github.com/users/abtx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-24T12:22:22Z","updated_at":"2015-04-24T12:35:20Z","closed_at":null,"body":"Hi, I'm looking for a way to initialise more sliders on the go. I'm using jQuery clone to add new sliders to the list, which I guess is causing the issue (\"slider already initialised\") when I try to reinitialise it. I create class name dynamically and pass it to initSlider function to initialise the new slider, trying to use destroy() on the element before passing code for noUISlider:\r\nfunction initSlider(slider){\r\n  $(slider).destroy()\r\n  $(slider).noUiSlider({\r\n    start: [ 15 ],\r\n    step: 15,\r\n    range: {\r\n      'min': [  15 ],\r\n      'max': [ 120 ]\r\n    }\r\n  });\r\n  $(slider).Link('lower').to($('#slider-range-value'));\r\n}\r\nWith this code, however, I get '$(...).destroy is not a function'. Any ideas how to solve this? Thanks"},"comment":{"url":"https://api.github.com/repos/leongersen/noUiSlider/issues/comments/95918910","html_url":"https://github.com/leongersen/noUiSlider/issues/437#issuecomment-95918910","issue_url":"https://api.github.com/repos/leongersen/noUiSlider/issues/437","id":95918910,"user":{"login":"leongersen","id":1206361,"avatar_url":"https://avatars.githubusercontent.com/u/1206361?v=3","gravatar_id":"","url":"https://api.github.com/users/leongersen","html_url":"https://github.com/leongersen","followers_url":"https://api.github.com/users/leongersen/followers","following_url":"https://api.github.com/users/leongersen/following{/other_user}","gists_url":"https://api.github.com/users/leongersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leongersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leongersen/subscriptions","organizations_url":"https://api.github.com/users/leongersen/orgs","repos_url":"https://api.github.com/users/leongersen/repos","events_url":"https://api.github.com/users/leongersen/events{/privacy}","received_events_url":"https://api.github.com/users/leongersen/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T12:35:20Z","updated_at":"2015-04-24T12:35:20Z","body":"`destroy` is a method on the DOM element, so on `slider`, not `$(slider)`."}}