The old jScrollPaneRemove () function looked something like this:
$.fn.jScrollPaneRemove = function() { $(this).each(function() { $this = $(this); var $c = $this.parent(); if ($c.is('.jScrollPaneContainer')) { $this.css( { 'top':'', 'height':'', 'width':'', 'padding':'', 'overflow':'', 'position':'' } ); $this.attr('style', $this.data('originalStyleTag')); $c.after($this).remove(); } }); }
As you can see, this removes css or rather sets it to nothing and resets the style tag to its original styles. The problem is that the originalStyleTag is also deleted, but it looks something like this:
$this.data('originalStyleTag', $this.attr('style'));
Thus, this is basically a way to preserve old styles before activating jScrollPane and reapplying them when deleting jScrollPane.
A lot has changed in the new version, and I donβt know if this method still works, but it looks like this is a way to preserve the old styles before running jScrollPane, reset any css set by jScrollPane, and set the css bak to the old styles to do so as it was before jScrollPane.
It seems like a lot, and I would seriously think about trying to remove jQuery, delete, disconnect or anything else in different containers related to jScrollPane, and if all else fails, try making the above function in a script, All you really need To do this, get the old styles in the data array before running jScrollpane, and then see if the old delete function still works.