Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

identify div

Posted on 2014-02-27
3
Medium Priority
?
236 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
[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
3 Comments
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 1500 total points
ID: 39894533
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
ID: 39899628
Thanks
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39899914
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
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.

670 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