Solved

scrollup

Posted on 2014-03-03
4
143 Views
Last Modified: 2014-03-07
Hi

I have three images , i am scrolled down till

last image , now if i try to scroll up the last

image , i am unable to scroll because the window

was already scrolled down.

now how do i scroll up the last image,once i scrolled

up the last image i want to load few more images

I cannot use click event as it is doing some other

operations on click event so,I used window.scroll , but it is helpless.

I am using asp.net mvc and jquery.

could you please suggest how to achieve this.

           Many thanks.
0
Comment
Question by:praveen1981
  • 2
  • 2
4 Comments
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 39902072
A code sample would help please.  It may just be something simple but hard to know without seeing the code.
0
 

Author Comment

by:praveen1981
ID: 39906040
please find the code in below

$(window).scroll(function () {

                var lastdiv = $('.homepage-slider').last();
                lastdiv.attr('id', '100');
                $('#100').scrollTop(function () {

                 // call function to load images

                });
});

i am calling the function loadimages but it is not  firing after the last image.

i.e initially i have 3 images , after the last image if i scroll up , i want to load few more images but the scrolltop event is not working because the window is already scrolled down ,

please suggest how to achieve this.
0
 
LVL 42

Accepted Solution

by:
Rob Jurd, EE MVE earned 500 total points
ID: 39908243
To be honest, that's what i thought you were referring to.  This is called "Lazy Loading" and don't go reinventing the wheel but use a plugin such as this one given you're using jquery. http://www.appelsiini.net/projects/lazyload
0
 

Author Closing Comment

by:praveen1981
ID: 39912237
Many thanks
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best way to accomplish this task? 3 88
Where to obtain Oracle Data Provider for .NET 3.5 7 53
WCAG audit tools 1 82
Poor Man's .NET Framework Certification 2 59
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

803 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