{"action":"opened","issue":{"url":"https://api.github.com/repos/bqworks/slider-pro/issues/71","labels_url":"https://api.github.com/repos/bqworks/slider-pro/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/bqworks/slider-pro/issues/71/comments","events_url":"https://api.github.com/repos/bqworks/slider-pro/issues/71/events","html_url":"https://github.com/bqworks/slider-pro/issues/71","id":96816948,"number":71,"title":"Problem with destroy on resize","user":{"login":"Matt23a","id":13468348,"avatar_url":"https://avatars.githubusercontent.com/u/13468348?v=3","gravatar_id":"","url":"https://api.github.com/users/Matt23a","html_url":"https://github.com/Matt23a","followers_url":"https://api.github.com/users/Matt23a/followers","following_url":"https://api.github.com/users/Matt23a/following{/other_user}","gists_url":"https://api.github.com/users/Matt23a/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt23a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt23a/subscriptions","organizations_url":"https://api.github.com/users/Matt23a/orgs","repos_url":"https://api.github.com/users/Matt23a/repos","events_url":"https://api.github.com/users/Matt23a/events{/privacy}","received_events_url":"https://api.github.com/users/Matt23a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-23T13:39:58Z","updated_at":"2015-07-23T13:39:58Z","closed_at":null,"body":"I want to destroy the slider on resize and restart it with new options. However there are errors when I try to destroy and recreate it. Simple Example:\r\n\r\n    $(window).resize(function() {\r\n    var slider = $( '#my-slider' ).data( 'sliderPro' );\r\n    slider.destroy();\r\n    $( '#my-slider').sliderPro();\r\n    });\r\n\r\nError: Uncaught TypeError: Cannot read property 'animatedLayers' of undefined\r\n\r\nAnd on the next resize it is not possible to destroy the slider, because of that error:\r\nUncaught TypeError: Cannot read property 'destroy' of undefined\r\n\r\n"}}