Skip to content
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

Grid not responsive - And an example solution #22

Closed
hergaiety opened this issue Oct 1, 2013 · 2 comments
Closed

Grid not responsive - And an example solution #22

hergaiety opened this issue Oct 1, 2013 · 2 comments
Assignees
Labels
Feature request Request for a new functionality

Comments

@hergaiety
Copy link

While the slider itself attempts to be responsive, the grid and text components don't update their position to respect the new size. While there may be a better CSS solution, below is my "hack" simple solution to this issue in case it may help others.

var updateSliderScale;
$(window).resize(function(){
    clearTimeout(updateSliderScale);
    updateSliderScale = setTimeout(function(){
        $(yourSliderHere).ionRangeSlider('update');
    }, 100);
});

This simply watches to see if the browser resizes, and if it does it will force the ionRangeSlider to update itself. I've added a 100ms timer to it so it won't lag with unecissary update calls which can stack up quite quickly.

@IonDen
Copy link
Owner

IonDen commented Oct 1, 2013

Hi, i think now you should use your hack, because i never thought that such a complex module will work properly in the responsive layout. But i will think about this feature, and will try to implement it in the future.

@ghost ghost assigned IonDen Oct 1, 2013
@hergaiety
Copy link
Author

Sounds good and thanks for the reply :) mostly wanted to post a temporary fix for others in case anyone else is looking for a temporary solution.

I really love this plugin and I thank you so much for creating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new functionality
Projects
None yet
Development

No branches or pull requests

2 participants