Skip to content
This repository
Browse code

Added the 'unscrollbar' method

  • Loading branch information...
commit c0b1312a5003aa236bfcebbeef94835d7a8452fa 1 parent d1b681d
John Mertens mertonium authored

Showing 1 changed file with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. +23 0 jquery.scroll.js
23 jquery.scroll.js
@@ -173,6 +173,19 @@ Changelog:
173 173 return this.each(function(){
174 174 this.scrollbar.scrollto(to);
175 175 });
  176 + },
  177 +
  178 + // Remove the scrollbar (and the generated HTML elements).
  179 + //
  180 + // usage:
  181 + // $('selector').scrollbar("unscrollbar");
  182 + //
  183 + unscrollbar: function() {
  184 + return this.each(function() {
  185 + if(this.scrollbar) {
  186 + this.scrollbar.unscrollbar();
  187 + }
  188 + });
176 189 }
177 190 }
178 191
@@ -476,6 +489,16 @@ Changelog:
476 489 this.setHandlePosition();
477 490 this.setContentPosition();
478 491 },
  492 +
  493 + //
  494 + // Remove scrollbar dom elements
  495 + //
  496 + unscrollbar: function() {
  497 + var holder = this.container.find('.scrollbar-pane').find('*');
  498 + this.container.empty();
  499 + this.container.append(holder);
  500 + this.container.attr('style','');
  501 + },
479 502
480 503
481 504 // ---------- event handler ---------------------------------------------------------------

0 comments on commit c0b1312

Please sign in to comment.
Something went wrong with that request. Please try again.