Thursday, January 30, 2014

Sticky Sidebar Page Per Widget


 Place the following code above </body>

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2' type='text/javascript'/>
 <script type='text/javascript'> $(function() { 
var offset = $(&quot;#HTML7&quot;).offset(); 
var topPadding = 35;
$(window).scroll(function() { 
       if ($(window).scrollTop() &gt; offset.top) { 
         $(&quot;#HTML7&quot;).stop().animate({ 
                   marginTop: $(window).scrollTop() - offset.top + topPadding }); }
 else { $(&quot;#HTML7&quot;).stop().animate({ marginTop: 0 }); }; }); }); 
 </script>




The BLUE color is replaced with a widget on your blog that will be made stiky ( ID WIDGET )
if there had been no need jqueryscript then given again
DEMO : try to scroll the page and look to the right

No comments:

Post a Comment