Permalink
Browse files

Merge pull request #6 from yuest/master

hide scrollbar in IE
  • Loading branch information...
Jonathan Azoff
Jonathan Azoff committed May 17, 2012
2 parents 3973435 + e046290 commit 4a3f3c88bcb77cfe929742f3905a3538e5d9d238
Showing with 5 additions and 2 deletions.
  1. +5 −2 jquery.autoresize.js
View
@@ -36,6 +36,7 @@
offset = scroll > height ? (scroll - height) : 0;
target.data('minHeight', height);
target.data('scrollOffset', offset);
+ $.browser.msie && target.css('overflow-y', 'hidden').scroll(function(){this.scrollTop = 0});
return target.val(value);
}
@@ -45,7 +46,9 @@
scrollOffset = target.data('scrollOffset'),
minHeight = target.data('minHeight'),
scrollTop = frame.scrollTop(),
- scrollHeight = target.height(minHeight).prop('scrollHeight') - scrollOffset;
+ scrollHeight;
+ $.browser.msie || target.height(minHeight);
+ scrollHeight = target.prop('scrollHeight') - scrollOffset;
target.height(scrollHeight);
frame.scrollTop(scrollTop);
if (targetHeight !== scrollHeight) {
@@ -62,4 +65,4 @@
return this.filter(ALLOWED_NODES).each(apply);
};
-})(jQuery, jQuery.fn, jQuery(window));
+})(jQuery, jQuery.fn, jQuery(window));

0 comments on commit 4a3f3c8

Please sign in to comment.