How to set different classes in the bootstrap from the page size?

Good day! Tell me how to do that would be in when col-xs that the menu was with their styles (for example navbar-inverse navbar-fixed-top), and when more xs then your styles.
July 2nd 19 at 13:57
1 answer
July 2nd 19 at 13:59
Solution
$(window).resize(function() { // if you changed the window size
 if($(window).width() < 768) { // create a condition that when the width of the window smaller 768px
 $('.col-xs').addClass('new-style'); // give the class col-xs new class new-style
}
});


Actually, I don't know why I wrote it, because there is a media quaries
at the same time in else I have to do to make the class new-style withdrew to when resize menu was left for mobile. and so the idea is correct. - Nina_Lesch commented on July 2nd 19 at 14:02
Thank You for the solution! - Lindsay.Goldne commented on July 2nd 19 at 14:05

Find more questions by tags CSSLayoutBootstrap