Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

jQuery Scroll follow

Posted on 2013-01-07
4
Medium Priority
?
549 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

721 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