Jump to content

ajaxcart does not display properly in Chrome or Safari


michael_s

Recommended Posts

I found that this function in main.js controls the properties of fixedFloatWrapper and changing absolute to inherit in two places fixed it for me.

 

$(document).ready(function(){

   recalcsummary();

   (function ($) {
       $.fn.basketFloat = function () {
           $me = this;
           var position = this.position();
           var yPos;
           $me.wrap('<div id="fixedFloatWrapper" style="position:inherit;left:' + position.left + 'px;" />');

           $(window).scroll(function () {
               yPos = $(window).scrollTop();
               if (yPos >= position.top) {
                   $me.css('position', 'fixed').css('top', '5px');
               } else {
                   $me.removeAttr("style");
               }
           });

           $(window).resize(function () {
               $('#fixedFloatWrapper').css('position', 'static');
               $me.removeAttr("style");
               position = $me.position();
               $('#fixedFloatWrapper').css({ 'position': 'inherit', 'left': position.left + 'px' });
               if (yPos >= position.top) {
                   $me.css('position', 'fixed').css('top', '0');
               } else {
                   $me.removeAttr("style");
               }
           });

       };
   })(jQuery);
   jQuery('#cartsummary').basketFloat();

});

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated