I found the solution to make jQuery Tools work with Back To Top, specifically the jquery tools tool tip function.

Jquery tools reference a much newer jquery 1.6.4 and drupal calling for older jquery version 1.4.4, I believe these clash and make BTT not work together.

Solution

Edit sites/all/modules/back_to_top/back_top_top.js

Replace:

Drupal.behaviors.backtotop = {
  attach: function(context) {
      (function($) {
      $("body").append("<div id='backtotop'>"+Drupal.t("Back to Top")+"</div>");
      $(window).scroll(function() {
        if($(this).scrollTop() != 0) {
          $('#backtotop').fadeIn();	
        } else {
          $('#backtotop').fadeOut();
        }
      });
  
      $('#backtotop').click(function() {
        $('body,html').animate({scrollTop:0},1200,'easeOutQuart');
      });	
    })(jQuery);
  }
};

With:

(function ($) {
	
Drupal.behaviors.backtotop = {
  attach: function(context) {

      $("body").append("<div id='backtotop'>"+Drupal.t("Back to Top")+"</div>");
      $(window).scroll(function() {
        if($(this).scrollTop() != 0) {
          $('#backtotop').fadeIn();	
        } else {
          $('#backtotop').fadeOut();
        }
      });
  
      $('#backtotop').click(function() {
        $('body,html').animate({scrollTop:0},1200,'easeOutQuart');
      });	

  }
};

})(jQuery);

All I did was move the attach handler ((function ($) {) outside of the code, according to what this article suggested: http://drupal.org/node/756722

By no means am I an expert so I ask for this to be reviewed and input from the community, this solution worked for me and hope this helps others.

Comments

acke’s picture

Assigned: Unassigned » acke

Ah, I see the recommendation to have all jQuery wrapped. I will try it out.

Thanks for the suggestion!

acke’s picture

Status: Needs review » Fixed

Seems to work excellent. It's commited to HEAD and going into the next release.

Thanks for the help and I also found out how to give credit in commits now! :)

Zenko’s picture

Awesome Mattias glad I could help out if I come across more issues I'll be sure to share them.

On a side note I have used other jquery functions on my site and all seem to work well with BTT.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

removed website demo, no longer using jquery tools (conflicts with shadowbox) but solution still works.