Solved

jQuery Scroll follow

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

617 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