waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

not able to initialize sticky

Open lschneiderman opened this issue 10 years ago • 2 comments

I'm sure this is a simple problem, but I'm pulling my hair out.

I'm trying to make the element .subheads_wrapper sticky on my page.

I've put the latest waypoints files under Inetpub\wwwroot\includes\waypoints-master.

My page is in Inetpub\wwwroot\mypage\index.php

In the header, I've attached the proper files I think:

<script src="../includes/waypoints-master/lib/jquery.waypoints.min.js"></script>
<script src="../includes/waypoints-master/lib/shortcuts/sticky.min.js"></script>

css:

.stuck {
  position:fixed;
  top:0;
}

jquery:

var sticky = new Waypoint.Sticky({
     element: $('.subheads_wrapper')[0]
});

But I keep getting the error:

Waypoint.Sticky is not a constructor

What am I doing wrong?

lschneiderman avatar Nov 14 '16 19:11 lschneiderman

Same problem here! :(

ryadkarar avatar Jun 08 '17 09:06 ryadkarar

Just paste or type the code to the sticky.js file.

ianaisa25 avatar Nov 30 '17 15:11 ianaisa25