Closed joncursi closed 9 years ago
I understand, I'll add in a "bind" and "unbind" method to allow this.
Give this a whirl let me know if it was what you were looking for.
slider.unbind();
slider.rebind();
@lukesnowden awesome, this unbinds the events like I was hoping for. I notice that the body
element still has class="active-slide-x"
attached to it, and the ul id="fsvs-pagination"
is still floating around in the DOM, but I can take those out programmatically using jQuery. Thanks!
$('html').attr('class', '');
$('body').attr('class', '');
$('#fsvs-pagination').remove();
I agree it's not the most elegant solution and the code needs refactoring but I'm limited on the time I can spend on it. Thought the event bindings were the most important things to remove
hopefully this will remove most of the lingering aftermath :+1:
:+1:
Is it possible to remove FSVS and it's associated events from the DOM programmatically? For example, in a client-side templating system like Ember or Meteor, views are being swapped on and off of the screen without having to refresh the browser. So when I swap out my FSVS view for a non-FSVS view, I'd like to remove these events. Currently, I'm getting some wonky behavior trying to scroll on the non-FSVS views because the events are still present. Thanks!