Solved

scrollup

Posted on 2014-03-03
4
150 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
[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
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Rob
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 43

Accepted Solution

by:
Rob 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Does a Google search find images with the word being searched? 11 104
Reason for High TTFB 1 98
QQ problem 22 86
Why "Mobile First"? 5 59
If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

742 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