Comments (11)
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.
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.
Please Try this link http://jsfiddle.net/u2aLA/103/ this is close to what we are trying to achieve.
from waypoints.
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.
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.
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.
I'm sorry, I don't understand what the problem is now. Is there another sample of code I could see?
from waypoints.
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.
This still has the exact same bug I called out before:
$('.hiddenElement').waypoint(opts);
should be...
$('.hidden').waypoint(opts);
from waypoints.
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.
$('.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)
- Thier is a way to check if offset is true by deafult (without scroll)?
- Waypoints fire more than once when I reach and load new content HOT 2
- Error trying to download the zipball for the latest release (4.0.1)
- Offset doesn't work HOT 1
- Bug when scrolling up and down multiple times
- Cannot trigger WayPoint on context:
- big bottleneck issue code should to be improved
- Scroll to Waypoint?
- waypoints element jumpy on iOS & Safari
- Website Data Question
- Ajax items loaded by waypoints Infinite scroll do not work properly HOT 1
- Best JQuery version for the 4.0.1? HOT 1
- Infinite Scroll documentation incorrect
- Laggy when applied to multiple elements
- Jquery Latest version support HOT 2
- overrides window.onload event handlers attached using jQuery or window.addEventListener
- The page crashes on the IOS mobile (iPhone 12).
- Add semicolon
- Infinite: loads next page more than once
- Infinite: parseHTML strips out script tags by default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waypoints.