nathansearles/Slides — Issue #380: So close to having a fluid slider...
Author: jesselcampbell
Created: 2012-02-17 18:28:59+00:00
State: open

I've figured out a small customization that allows for the slider to be fluid/responsive width, but on `$(window).resize()` it seems to be messing with any other sliders I have on the page. To be more specific, the animation between slides on all other instances besides the fluid one becomes choppy, and spaced out.

Hoping someone can help me out. Here is my simplified HTML.

```HTML

Huzzah!

Double huzzah!

```

The javascript noted below has been added to the plugin, just below where all of the variables are initially defined. The `if(width < 1060)` statement is there to keep the `#project-slides` instance performing properly if the window is resized smaller than 1060px (a min-width that I've set in CSS).

```Javascript
$(window).resize(function() {
if( $(control).parent('.project-slides-container') ) {
height = control.children().outerHeight(),
width = control.children().outerWidth();
if( width < 1060 ) {
width = 1060;
}
}
});
```

My issue lies with the regular `.slides` instance after window resize. And the problem is in the `if(width < 1060)` statement. Because if I comment that out, the `.slides` instance works fine, but the `#project-slides` instance doesn't when below 1060px wide. Otherwise, the `#project-slides` instance is working great and I've got myself a fluid slider.

Have yourself a real-life look on [my development server](http://dev.jesselcampbell.com/cbls/).
And thanks in advance.