Title: angelcoding's Replies | WordPress.org

---

# angelcoding

  [  ](https://wordpress.org/support/users/angelcoding/)

 *   [Profile](https://wordpress.org/support/users/angelcoding/)
 *   [Topics Started](https://wordpress.org/support/users/angelcoding/topics/)
 *   [Replies Created](https://wordpress.org/support/users/angelcoding/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/angelcoding/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/angelcoding/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/angelcoding/engagements/)
 *   [Favorites](https://wordpress.org/support/users/angelcoding/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fixed Widget and Sticky Elements for WordPress] Widgets below fixed widgets "jump" up](https://wordpress.org/support/topic/widgets-below-fixed-widgets-jump-up/)
 *  [angelcoding](https://wordpress.org/support/users/angelcoding/)
 * (@angelcoding)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/widgets-below-fixed-widgets-jump-up/#post-3904637)
 * In case you want a demo of the above code working, have a look at [http://tipsrated.com](http://tipsrated.com)
 * Cheers and thanks Max for the plugin in the first place. Very useful!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fixed Widget and Sticky Elements for WordPress] Widgets below fixed widgets "jump" up](https://wordpress.org/support/topic/widgets-below-fixed-widgets-jump-up/)
 *  [angelcoding](https://wordpress.org/support/users/angelcoding/)
 * (@angelcoding)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/widgets-below-fixed-widgets-jump-up/#post-3904636)
 * It’s actually quite easy. I customised the js file …
 * In the function fixed_widget(widget) add a couple more vars …
 *     ```
       var widget_height = widget.obj.css('height');
       var widget_replacement = widget.obj.attr('id')+'_replacement';
       ```
   
 * then after if ( !style_applied_bottom ) { … change to this…
 *     ```
       widget.obj.css('position', 'fixed');
       widget.obj.css('top', '');
       widget.obj.css('width', widget_width);
       widget.obj.css('margin', widget_margin);
       widget.obj.css('padding', widget_padding);
       if(jQuery('#'+widget_replacement).length <= 0) {
       	widget.obj.after('<div id="'+widget_replacement+'" style="height:'+widget_height+';"></div>');
       }
       style_applied_bottom = true;
       style_applied_top = false;
       style_applied_normal = false;
       ```
   
 * then after if ( !style_applied_top ) { … change to this…
 *     ```
       widget.obj.css('position', 'fixed');
       widget.obj.css('top', widget.fixed_margin_top);
       widget.obj.css('bottom', '');
       widget.obj.css('width', widget_width);
       widget.obj.css('margin', widget_margin);
       widget.obj.css('padding', widget_padding);
       					if(jQuery('#'+widget_replacement).length <= 0) {
       	widget.obj.before('<div id="'+widget_replacement+'" style="height:'+widget_height+';"></div>');
       }
       style_applied_top = true;
       style_applied_bottom = false;
       style_applied_normal = false;
       ```
   
 * then after if ( !style_applied_normal ) { … change to this…
 *     ```
       if(jQuery('#'+widget_replacement).length > 0) {
       	jQuery('#'+widget_replacement).remove();
       }
       widget.obj.css('position', '');
       widget.obj.css('top', '');
       widget.obj.css('width', '');
       widget.obj.css('margin', '');
       widget.obj.css('padding', '');
       style_applied_normal = true;
       style_applied_top = false;
       style_applied_bottom = false;
       ```
   
 * The code isn’t necessarily perfect but you get the idea. I’ve only tested on 
   a top positioned sticky widget, which works very well. Not sure if it works as
   well with a bottom fixed widget.
 * Anyway, hope it helps.

Viewing 2 replies - 1 through 2 (of 2 total)