Solved

identify div

Posted on 2014-02-27
3
210 Views
Last Modified: 2014-03-03
Hi

I have ten images each loading dynamically and i have class responsiveimages for each div
now when the user is scrolling up the last image , i want to load ten more images , now how to identify that user is scrolling last image, this is for mobile appliction and i am using asp.net mvc, with html5 and css  and i am not using jquery mobile.

please suggest.
0
Comment
Question by:praveen1981
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
Comment Utility
If you are at least using jquery, you can use last child https://api.jquery.com/last-child-selector/  
$( "div:last-child" ) 

Open in new window

or in js https://developer.mozilla.org/en-US/docs/Web/API/Node.lastChild
var tr = document.getElementById("row1");
var corner_td = tr.lastChild;

Open in new window


Since you are generating the div's dynamically, you could just as easy add a class to the div like, "last_image".   Then create an event when that is reached to make an ajax call.
0
 

Author Closing Comment

by:praveen1981
Comment Utility
Thanks
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
praveen1981, I am glad this worked for you.   You awarded this question a "B" grade. What would have made the answer an "A".  Please note that the grading on EE is not like a school grade.  The default grade should be an "A" http://support.experts-exchange.com/customer/portal/articles/481419-what-grade-should-i-award-?b_id=44

A B grade means the solution given lacked some information or required you to do a good amount of extra work to resolve the problem. When closing the question, the asker should explain why a B grade was awarded.

Will you please let me know what this question lacked?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now