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
support multiple grids #6
Comments
I would ALSO recommend to debounce your and this will maximize performance greatly, while also allowing smooth transitions to be made via CSS to the grid's items. But, you would have to give the item's parent a styled width on event layout call. do this and your plugin will rock. |
Multiple grids on one page are supported. I am not sure whether debouncing the resize event is a good idea because you have to set a width to the container and when you decrease your window size the container can be larger then the window. Then a horizontal scrollbar appears or the layout of the page is destroyed because of the too large container for a second. This is very sloppy. I don't like it. |
well it's not about the actual resizing of the browser but rather the size change of the containing element. say, if you have a side menu and comes and goes, so when it comes in, the content area gets smaller. also, I know multiple grids are supported, BUT the plugin has to be called for each element, and it's considered a good plugin authoring to do Also this is a good read about layout performance with many DOM read/writes FYI : |
No! You can do something like this: It is done with the following code snippet:
|
well my way is the correct way and your way is a hacky one, because your way is doing hacky check to see if there are more than 1 selector and then call the plugin again, and on top of the you have 2 anyway, I wouldn't want to do |
I will change it. I trust you ;)
|
in your code, you have this piece:
please scope your events so they wouldn't collide with others code, and change it a little to:
BUT, you need to take that resize event outside, and wrap the rest of your initialization code with something like:
The text was updated successfully, but these errors were encountered: