First, I created a virtual carousel (carousel elements) and then initialize it
$('#first-carousel').carousel();
Now, I run unto scenario where if window width is less than 480 then remove that carousel (#first-carousel').
How to remove bootstrap carousel? Tried to check its doc but seems there's no something like destroy or remove function or any related. Tried
$('#first-carousel').remove();
$('#first-carousel').unbind();
but seems not working, instead it gives me this error
bootstrap.min.js:6 Uncaught TypeError: Cannot read property 'offsetWidth' of undefined at c.slide (bootstrap.min.js:6) at c.next (bootstrap.min.js:6) at e (jquery.min.js:2)
any help, ideas?