jquery-waypoints

$(window).scroll not fast enough to process my jquery?

拥有回忆 提交于 2021-02-08 10:55:54
问题 Im having an issue with window scrolling where I think events are firing too quickly to process. Im using waypoints to detect when a subnav on my page hits the header when scrolling, and when it does it pushes the header up off the page. And when scrolling back up, the header gets pulled down into its original position. Now the first part works flawlessly, the head gets pushed up, but pulling it back down is very buggy. Scrolling too quickly results in the header getting stuck on the way. It

Jquery $(this) not working inside function

只愿长相守 提交于 2021-01-28 01:44:51
问题 I am trying to use waypoints.js to have elements fadein when scrolling to hit the elements. I have $(document).ready(function(){ $('.card').waypoint(function(down) { console.log('hit element'); $(this).addClass('card-fadeIn'); }, { offset: '100%' }); }); What this does is adds the class 'card-fadeIn' which is opacity 1 and an ease in animation. When I change it to $('.card').addClass('card-fadeIn'); It works fine, but adds opacity 1 to every card class and ruins the fadein effect. I was

Waypoints.js waypoint is not a function

我们两清 提交于 2020-07-03 13:40:06
问题 I'm getting the console error: Uncaught TypeError: $(...).waypoint is not a function FYI: It is a Blogger template, which uses XML. I have included the files like so (only these two .js files): <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js'/> <script src='https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/noframework.waypoints.min.js'/> My jQuery (longer scripts removed for clarity): <script> // <![CDATA[ $.noConflict(); jQuery( document ).ready(function(

jQuery Waypoints fires on page load when images are display block

血红的双手。 提交于 2020-01-15 05:11:47
问题 Im using the jQuery waypoints plugin. This following is working fine except on page load the console message is fired before ive scrolled. This stops If I remove the display block being applied to the images, but I need this for my site to work. <!DOCTYPE html> <html> <head> <title>Test</title> <script src="js/jquery-2.0.3.js"></script> <script src="js/waypoints.js"></script> <style> body { margin: 0; padding: 0; } img { max-width: 100%; display: block; margin: auto; } #img3 { opacity: 0.5; }

On page refresh the impicit scroll waypoint (if not on top of page) does not get triggered

為{幸葍}努か 提交于 2020-01-06 14:05:47
问题 So I made a timer where it's possible to make an inview that is timed. That is a divs x% must be in view for at least y milliseconds. For this I've forked https://github.com/imakewebthings/waypoints repo, see here: https://github.com/gaborbernat/waypoints It all works okay, with a bug: on page refresh, the browser first renders the page, then scrolls where we previously were in the page. At waypoint creation time (page rendered) the vertical, down div in view waypoints gets triggered. However

“this” won't refer to the div in a JQuery listener

孤街浪徒 提交于 2019-12-31 03:28:06
问题 I have the below listener for a class .my-class (I'm using the waypoint plugin). However, if I try to call $(this).addClass("hello") , it does not add the class to the individual div that has the class and fired the listener. On the other hand, if I call $(".my-class").addClass("hello") inside the function instead, it adds the class hello to ALL instances of .my-class , which is not what I want. Am I misinterpreting how this is supposed to be used (I'm new to JS)? Shouldn't it refer to the

Hover Disabled after Waypoint Event

喜欢而已 提交于 2019-12-25 04:45:26
问题 I have set both a sprite hover event and waypoint Jquery events that change the css depending on the anchor/scroll on my main nav menu - jfiddle example can be found here: http://jsfiddle.net/LhLpm39p/17/ $('#news').waypoint(function (direction) { if (direction === 'up') { $('#news-menu').css({ "background-position": "0 0", "color": "#fff" }); } }, { offset: '100%' }).waypoint(function (direction) { if (direction === 'down') { $('#news-menu').css({ "background-position": "0 100%", "color": "

Preload images with JQuery to get dominant colour of image

青春壹個敷衍的年華 提交于 2019-12-24 17:57:36
问题 I created the following testpage: http://methodus.de/wp/ It gets the dominant colour of the images of each blog post and use them for animation when scrolling down the page. Unfortunately, the colour can't be calculated as long as the image isn't fully loaded (see the javascript alert). The animation doesn't work then. When I reload the page, the images where cached by the browser, and everything works like charme. The relevant code is: $('.bg').each(function(index) { var url = $(this).data(

jQuery waypoints delays

。_饼干妹妹 提交于 2019-12-24 11:21:17
问题 I have three elements that I want to fadeInUp when I scroll over to them. But, now comes the delay part, I want the two elements appear after the first one has appeared. But, the problem is that, it's not happening as expected, they are all showing up at the same time. Here's the fiddle : Fiddle I want the two yellow circles to appear after the first one with delays of 0.5s and 1s respectively. I've tried adding the class "delay-05s" and "delay-1s" to the elements but for a reason, It's not

Waypoints - Sticky Header Navigation. Links Are Highlighted Upon Scrolling Down But Not Scrolling Up

时光毁灭记忆、已成空白 提交于 2019-12-24 07:58:20
问题 I have a site template that I am working on that can be seen here: http://www.procardetail.co.uk/ As you can see I have Waypoints in action with a sticky header. Everything works fine when I am scrolling down the page and the navigation links highlight as expected as they encounter the anchors on the page. However when scrolling up, the functionality of highlighting the links does not work. The javascript I am using looks like this: $(function() { // Do our DOM lookups beforehand var nav