waypoints
waypoints copied to clipboard
No element option passed to Waypoint constructor
I am getting the above error when element id is passed dynamically but when i passed static id the above error doesn't appear. I am creating the div and appending the button dynamically like that
(div_views).append('') Now when i try to get the above id i.e button1 on waypoint, It generate above error. I am not sure why it happens.
var waypoint = new Waypoint({ element: document.getElementById('button1'), handler: function() { notify('Basic waypoint triggered') } }) Please reply as soon as possible.
I found this helpful: https://stackoverflow.com/questions/40252534/waypoints-no-element-option-passed-to-waypoint-constructor