Solved

jQuery Scroll follow

Posted on 2013-01-07
4
530 Views
Last Modified: 2013-01-13
Hi guys,

I'm trying to integrate  a jQuery scroll follow plugin on my eCommerce site but so far it isn't working at all

This is what I have done so far:

a) Included the jquery-ui-1.9.2.custom.js and jquery.scrollfollow.js plugins in the head of my site.

b) Created an id called #block-cart

c) included this with the code:
 
<script type="text/javascript">
        jQuery( document ).ready( function ()
            {
                jQuery( '#block-cart' ).scrollFollow();
            }
        );
    </script>

Open in new window


I followed this tutorial but its not working for me at the moment:

http://kitchen.net-perspective.com/open-source/scroll-follow/

Help me out please guys!!!
0
Comment
Question by:rafique12
  • 3
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38751885
Considering that the latest version is over 4 years old and the support forum has not been active in years it is quite possible that the plugin is obsolete.

Without a link to your page so we can see what it is doing, there is very little possibility that we can make a guess that will help.

Cd&
0
 

Author Comment

by:rafique12
ID: 38751920
Oh!

I'll reconvene.
0
 

Accepted Solution

by:
rafique12 earned 0 total points
ID: 38754141
Ok dude!

I got it working:

CSS:
 
#sidebar{
    width:auto;
    position: absolute;
    float: right;
}

Open in new window


JQUERY
    <script type="text/javascript">
        jQuery(function() {
            var offset = jQuery("#sidebar").offset();
            var topPadding = 15;
            jQuery(window).scroll(function() {
                if (jQuery(window).scrollTop() > offset.top) {
                    jQuery("#sidebar").stop().animate({
                        marginTop: jQuery(window).scrollTop() - offset.top + topPadding
                    });
                } else {
                    jQuery("#sidebar").stop().animate({
                        marginTop: 0
                    });
                };
            });
        });
    </script>

Open in new window

0
 

Author Closing Comment

by:rafique12
ID: 38771541
Works perfectly!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question