From a2f9fa3455fcf55f6967e30ada23a99d7770bfde Mon Sep 17 00:00:00 2001 From: saiful Date: Tue, 14 Jan 2014 21:29:07 +0700 Subject: [PATCH] Set width to fix responsive, specially for Twitter bootstrap 3 I tried in Twitter Bootstrap to ScroollToFixed my some panel-heading on .row .col-md-12 .panel .panel-heading, also in .col-md-6, in the end on windows resize 480x600. --- jquery-scrolltofixed.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jquery-scrolltofixed.js b/jquery-scrolltofixed.js index c885f73..dc2771c 100644 --- a/jquery-scrolltofixed.js +++ b/jquery-scrolltofixed.js @@ -141,6 +141,9 @@ } if (!base.options.dontSetWidth){ cssOptions['width']=target.width(); }; + //Set width to fix responsive, specially for Twitter bootstrap 3 + cssOptions['width']=target.outerWidth(true)+'px'; + target.css(cssOptions); target.addClass('scroll-to-fixed-fixed');