bootstrap-waterfall icon indicating copy to clipboard operation
bootstrap-waterfall copied to clipboard

waterfall() is not a function

Open warmjaijai opened this issue 8 years ago • 2 comments

Following exactly the same with the instruction but console log waterfall() is not a function

Not sure where the problem is.

warmjaijai avatar Dec 16 '16 06:12 warmjaijai

What's about console.log($.fn.waterfall)? Make sure the code runs after the source file successfully loaded.

Also, definitely fork the repo and run it on your local, you'll see how it works.

mystist avatar Dec 19 '16 09:12 mystist

It means bootstrap-waterfall.js has not yet been loaded when you're calling .waterfall() in your page.

This is (most likely) due to linking the script directly from github: https://raw.githubusercontent.com/Mystist/bootstrap-waterfall/master/dist/bootstrap-waterfall.js or https://rawgithub.com/Mystist/bootstrap-waterfall/master/dist/bootstrap-waterfall.js

Github should not be used as cdn. Specifically, they do not add the cors header to allow loading from all. To fix, just download the script in your project and include from there.

andrei-gheorghiu avatar Apr 03 '17 10:04 andrei-gheorghiu