-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running waterfall() multiple times #7
Comments
anyone ? |
@halfcab123 For your question: $('.waterfall').waterfall('destroy');
$('.waterfall').data('bootstrap-waterfall-template', $('#waterfall-template').html()) // $('#waterfall-template').html() can be any markups from anywhere
$('.waterfall').waterfall() Really sorry for the late reply~ |
I'm pre-rendering a template on the server with nodejs that gets sent dynamically, so the html is already existent in the div when I run .waterfall I might as well just ask, how to do with static html and no template. |
@halfcab123 We can tell the whole logic from source code: It will get all the pin's markups from:
You can choose each one of them. BTW, different from some of the other waterfall plugin, which are take more cares of the use cases for the end user and add more functionality and make it more fancy, So, if you are interested in the source code, play with it and have fun! Happy coding 🤣 |
Thank you so much for taking the time to reply :)
[image: PerfectRoot] <http://www.perfectroot.com/>
Christopher Ridgeway / COO
[email protected] / (757)-215-6346
PerfectRoot
http://www.perfectroot.com
…On Wed, May 31, 2017 at 10:31 PM, Mystist ***@***.***> wrote:
@halfcab123 <https://github.com/halfcab123> We can tell the whole logic
from source code:
https://github.com/Mystist/bootstrap-waterfall/blob/master/src/bootstrap-
waterfall.js#L122
var $elements = this.$element.children().length > 0 ?
this.$element.children().remove() : $(this.$element.data('
bootstrap-waterfall-template'))
It will get all the pin's markups from:
1. The div container's children, if only the container has children
2. The container's data object
You can choose each one of them.
BTW, different from some of the other waterfall plugin, which are take
more cares of the use cases for the end user and add more functionality and
make it more fancy, bootstrap-waterfall will take more care of the
developers.
The idea is to write well structured and easy to understood codes for the
developers, then they can fork it and customize it and make it fit their
special use cases.
So, if you are interested in the source code, play with it and have fun!
Happy coding 🤣
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFNqxate6FZ0occ4Pfauz5aSANtdXx0-ks5r_iJugaJpZM4NcrtE>
.
|
I would like to be able to remove pins from
And once they are removed, re-run waterfall() to reorganize the remaining pins into a waterfall.
Is this currently possible?
Re-running waterfall() just seems to cause issues, and I am not really able to remove pins successfully.
The text was updated successfully, but these errors were encountered: