Afroman Makgalemela
Afroman Makgalemela

Reputation: 740

Javascript slider and Responsive Design

I have a media query that works well, except, when user resize window, the images on the jQuery slider dont resize, until the user manually refreshes the page. I am getting that the slider(http://bxslider.com/) gets the window size when page is rendered and not on the fly. Anyone experienced same thing before?

All help will be appreciated.

Upvotes: 0

Views: 198

Answers (1)

Tony
Tony

Reputation: 186

Well since you're using jQuery you can check for the window being resized and then reload the slider.

The event hook is:

window.onresize = function(event) {
    //Now reload your slider from the link in your post it seems like it's:
     $('.bxslider').bxSlider();
}

Upvotes: 1

Related Questions