cloud9carousel icon indicating copy to clipboard operation
cloud9carousel copied to clipboard

Re-Initalize when resize window

Open LaYOOOs opened this issue 2 years ago • 1 comments

I would like to ask, how can i re-init the script, when the window size (width) modified.

Best Regards, LaYOOOs

LaYOOOs avatar Apr 17 '22 22:04 LaYOOOs

Most likely you're interested in taking into account the new dimensions of the parent container when it is resized.

Currently the carousel dimensions are decided based on the dimensions of the parent container during initialization, if they weren't explicitly specified:

https://github.com/specious/cloud9carousel/blob/c25c4ccf21c0f831142b313d0e733b79a6731bb2/jquery.cloud9carousel.js#L133-L136

It would make sense to change the code to calculate these carousel dimensions on every render, so that the carousel would become responsive to layout changes.

Pull requests are welcome.

specious avatar May 12 '22 12:05 specious