Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

scrollup

Posted on 2014-03-03
4
Medium Priority
?
153 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 1500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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.

604 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