Solved

jQuery Scroll follow

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

912 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

22 Experts available now in Live!

Get 1:1 Help Now