Git Product home page Git Product logo

Comments (11)

imakewebthings avatar imakewebthings commented on June 16, 2024

I can't say for sure without looking at the site. If it's something you can share I'd be happy to look. Does the data you get back from your get contain an anchor element with class more?

$('.more').replaceWith($data.find('.more'));

That line expects your AJAX request to be returning html and that it contains the link for the next load.

from waypoints.

imakewebthings avatar imakewebthings commented on June 16, 2024

Or sorry, you might be saying the opposite, that it works only after the first load is triggered manually. If that's the case, is initWaypoint() being called in the right place? Does the anchor have the right URL in it on page load? A live example would still be best :)

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024

Please Try this link http://jsfiddle.net/u2aLA/103/ this is close to what we are trying to achieve.

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024

I was making a Mistake where i wasn't passing the opts to the
var opts={
offset:"100%"
};
someElement.waypoint(function(event,direction){
$('.hiddenElement').waypoint('remove');
loadmore();
//Removing the waypoint and attaching it again to the dom.
$('.hiddenElement').waypoint(opts);
},opts)

Doesn't fire the waypoint reached again.

Sample code Below

http://jsfiddle.net/u2aLA/121/

from waypoints.

imakewebthings avatar imakewebthings commented on June 16, 2024

Because you are recalling waypoint on .hiddenElement which doesn't exist, and not .hidden. Here is the corrected code: http://jsfiddle.net/imakewebthings/u2aLA/122/

As an aside, I don't know if you're using the same markup in the wild, but the HTML you have there is incredibly invalid, and your <li> elements are all closed </l1> (L ONE).

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024

Thanks for Pointing that out...not sure what i was thinking when i wrote the mail.

That one worked for the sample code.

However , Some how for me the added elements to the UL's
the li's are are not of same height they are 20px to 40px height and some how when new elements are added the scroll only move a little owing to which when i scroll down again the way point is not fired again as it could be its above the view port i am not sure of that. Is it a good practice to Remove the waypoint once attached to the dom and the update it ? or

What will cause the Waypoint not to fired on new elements added?

Thanks for your help

from waypoints.

imakewebthings avatar imakewebthings commented on June 16, 2024

I'm sorry, I don't understand what the problem is now. Is there another sample of code I could see?

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024

Thanks for your time ,your help is Really Appreciated. I have Reduce the the Height of Li items to show you exactly what happens, The Waypoints gets fired on the load itself and then its gets appended by a list of another list of li's which gets added but after that the waypoint handler won't execute. below is the link to sample code.

http://jsfiddle.net/u2aLA/135/

from waypoints.

imakewebthings avatar imakewebthings commented on June 16, 2024

This still has the exact same bug I called out before:

 $('.hiddenElement').waypoint(opts);

should be...

 $('.hidden').waypoint(opts);

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024

Damm. I know its my fault. But the example which work in js fiddle like magic i am not able to reproduce the same issue there. In real scenario it doesn't for me..although i haven't made a blunder as i am doing in sample code.

Let me see if i can host it somewhere and point a link. Thanks for bearing with me your help is appreciated.

from waypoints.

smapsekar avatar smapsekar commented on June 16, 2024
 $('.hidden').waypoint(opts);

Had to be Recalled at the Right Place . after i make an Ajax Request.

Thank you very Much...

from waypoints.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.