bootstrap-waterfall
bootstrap-waterfall copied to clipboard
Adding `addNewPins()` (or update) method.
I like, appreciate and use the script.
On using it for this particular case I was looking for a method to add new pins after the initial calculation, without changing or affecting the ones that have already been parsed/placed. I toyed with it for a bit over an hour, trying to call the necessary internal functions but, in my case, the resulting pins were wider and not wrapping correctly. I eventually gave up.
Let me know if you ever end up adding such a method. Thank you.
@andrei-gheorghiu Check this out: https://github.com/Mystist/bootstrap-waterfall/commit/4ae697195ead041f4f10de8af51f30d3b2383f35
If you can run the demo locally, run $('.waterfall').data('mystist.waterfall').addPins($($('#another-template').html()))
whenever you like to add new pins!
Newly added pins will shows up when you scrolled to the bottom of page.
Thanks for your contribution!
Also, going to rewrite it with ES2015 and add more use cases! Will be great if can have you on the way there!
@Mystist Thanks for adding the method.
You rock, man. Keep it up!
请问分页时候的数据怎么添加,我这样写$( “#另一个模板”)追加(informArr);另一种模板模板有数据,但不会更新到页面,一闪一闪的