Solved

jQuery Scroll follow

Posted on 2013-01-07
4
524 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now