Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi All,
Have the latest 4.0 install and for some reason can not get waypoints to work. JS is loaded up through .info file and eveything seems correct but just cant get it to work. Any ideas?? Has anyone else got waypoints working for them?
Comments
Comment #1
fubhy CreditAttribution: fubhy commentedI assume you are talking about waypoint.js?
Comment #2
benjmarr CreditAttribution: benjmarr commentedCorrect
Comment #3
benjmarr CreditAttribution: benjmarr commentedanyone? still struggling here.
Comment #4
fubhy CreditAttribution: fubhy commentedI am still at drupalcon and highly busy. You'll have to figure it out on your own or wait til monday, sorry.
Comment #5
benjmarr CreditAttribution: benjmarr commentedDon't be sorry!! If you could have a look when you get a chance next week that would be great!!
Comment #6
fubhy CreditAttribution: fubhy commentedSo... I loaded waypoint.js with my test theme's .info file, added a waypoint in a behavior, worked.
With 0 friction basically... Hmm, not sure where you were running into problems. Can you explain a bit what you did and what exactly didn't work? From the issue summary I can only tell that the .js was loaded but then you had problems with getting waypoints to work. So the .js is loaded, right? Does the waypoint.js API not work for you? As in, is it not available to you? Or are you just having problems with implementing the waypoint.js API? If it's the latter there is not much I can help you with as I don't know all the .js libraries in the world and can't provide any support for those of course. In any case, please give us some more detail to your problem. Thanks!
Comment #7
benjmarr CreditAttribution: benjmarr commentedstrange... i did a complete fresh install and still no luck. I did however get it to work using the following-
I ended up having to add this to the bottom of the custom layout.tpl file-
$('#my-sticky-element').waypoint('sticky');They would load up if declaring in my sub-themes .info file but for some reason wouldn't work. This is what it looks like when pulled from the .info file
not sure if it has something to do with the ?mtxp73 ??
any thoughts?? im happy to leave it as is while deving but probably not the right way to do it on a production site. For some reason i even need to declare the jquery location in the layout.tpl file otherwise it wont work.
Comment #8
steinmb CreditAttribution: steinmb as a volunteer commented@brandercreative can we close this?