Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added the 'unscrollbar' method

  • Loading branch information...
commit c0b1312a5003aa236bfcebbeef94835d7a8452fa 1 parent d1b681d
John Mertens mertonium authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 jquery.scroll.js
23 jquery.scroll.js
View
@@ -173,6 +173,19 @@ Changelog:
return this.each(function(){
this.scrollbar.scrollto(to);
});
+ },
+
+ // Remove the scrollbar (and the generated HTML elements).
+ //
+ // usage:
+ // $('selector').scrollbar("unscrollbar");
+ //
+ unscrollbar: function() {
+ return this.each(function() {
+ if(this.scrollbar) {
+ this.scrollbar.unscrollbar();
+ }
+ });
}
}
@@ -476,6 +489,16 @@ Changelog:
this.setHandlePosition();
this.setContentPosition();
},
+
+ //
+ // Remove scrollbar dom elements
+ //
+ unscrollbar: function() {
+ var holder = this.container.find('.scrollbar-pane').find('*');
+ this.container.empty();
+ this.container.append(holder);
+ this.container.attr('style','');
+ },
// ---------- event handler ---------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.