Title: Cannot use this plugin with .scrollTop
Last modified: August 21, 2016

---

# Cannot use this plugin with .scrollTop

 *  Resolved [jamo_dodger](https://wordpress.org/support/users/jamo_dodger/)
 * (@jamo_dodger)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-use-this-plugin-with-scrolltop/)
 * Hello Max,
 * This is not a problem with the plugin itself, but you may have an easy fix for
   me. I am a bit of a noob when it comes to javascript and I have installed your
   plugin to get a sidebar widget to stick to the top of the window when scrolled
   past.
 * This has worked great so far however I have recently created another Div that
   appears upon scrolling. (similar to a mashable post page where the share buttons
   appear upon scrolling)
 * I use the following javascript to get this to work:
 *     ```
       var $j = jQuery.noConflict();
       var startY = $j('.main-navigation').position().top + $j('.main-navigation').outerHeight();
   
       $j(window).scroll(function(){
           if( $j(this).scrollTop() > startY ){
               $j('.floating-share-bar').slideDown();
           }else{
               $j('.floating-share-bar').slideUp();
           }
       });
       ```
   
 * This stops my sidebar widget from sticking and I presume it is because the plugin
   also uses .scrollTop.
 * Any ideas on how I could overcome this?I know it is nothing to do with the plugin
   but it might be useful for this forum if others wanted to do something similar.
 * James
 * [https://wordpress.org/plugins/q2w3-fixed-widget/](https://wordpress.org/plugins/q2w3-fixed-widget/)

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

 *  Thread Starter [jamo_dodger](https://wordpress.org/support/users/jamo_dodger/)
 * (@jamo_dodger)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-use-this-plugin-with-scrolltop/#post-4675244)
 * PS. I have also tried checking the jQuery(window).load() hook option and this
   does make my widget stick. However it messes up the widget – I am using d4p-smashing-
   tabber with recent posts widgets in each tab and when I tick this box above the
   tabs display on top of one another.
 * Any advice would be great
 * James
 *  Thread Starter [jamo_dodger](https://wordpress.org/support/users/jamo_dodger/)
 * (@jamo_dodger)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-use-this-plugin-with-scrolltop/#post-4675256)
 * Ok this is for anyone has actually understood what I said before.
 * The problem was not with the plugin, or the JS used above. The problem was that
   when I loaded the script in my footer.php I used the following:
 *     ```
       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
       <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/floating-share-bar.js"></script>
       ```
   
 * The problem was being caused by the loading the googleapis jquery library. Once
   I had removed this everything works perfectly.
 * James

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

The topic ‘Cannot use this plugin with .scrollTop’ is closed to new replies.

 * ![](https://ps.w.org/q2w3-fixed-widget/assets/icon-256x256.png?rev=2384479)
 * [Fixed Widget and Sticky Elements for WordPress](https://wordpress.org/plugins/q2w3-fixed-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/q2w3-fixed-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/q2w3-fixed-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/q2w3-fixed-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/q2w3-fixed-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/q2w3-fixed-widget/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [other](https://wordpress.org/support/topic-tag/other/)
 * [scrolltop](https://wordpress.org/support/topic-tag/scrolltop/)
 * [using](https://wordpress.org/support/topic-tag/using/)

 * 2 replies
 * 1 participant
 * Last reply from: [jamo_dodger](https://wordpress.org/support/users/jamo_dodger/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-use-this-plugin-with-scrolltop/#post-4675256)
 * Status: resolved