Reputation: 9476
Yes, I know this probably has nothing to do with waypoints. I'm sorry.
I am following this example: http://imakewebthings.com/jquery-waypoints/#get-started
Here is my very simple javascript:
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="/includes/js/waypoints/waypoints.min.js"></script>
<script type="text/javascript">
$(document).ready(function(direction) {
$('#example-basic').waypoint(function() {
notify('Basic example callback triggered.');
});
});
</script>
The scripts are loaded. The jQuery code is pretty much word-for word copied from the example.
And I am getting that error whenever I scroll past element with id 'example-basic'.
I cannot find information on any such "notify" method.
Any ideas?
Upvotes: 4
Views: 12721
Reputation: 189
Use this instead
console.log('Basic example callback triggered.');
Upvotes: -1
Reputation: 432
Notify is a totally separate library from Waypoints (!!), I just realized this myself. You need to have notify included, along w JQuery, it is not a built in function to JQuery or JavaScript:
Upvotes: 5
Reputation: 2809
There is a function defined in index.js as Notify, may be that's all you need
var notify = function(message) {
var $message = $('<p style="display:none;">' + message + '</p>');
$('.notifications').append($message);
$message.slideDown(300, function() {
window.setTimeout(function() {
$message.slideUp(300, function() {
$message.remove();
});
}, 2000);
});
};
Upvotes: 6