Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var windowSize = $(window).width();
- if (windowSize >= 1200) {
- $('.carousel').css('width','100%');
- }
- if (windowSize >= 800 && windowSize < 1200) {
- $('.carousel').css('width','400');
- }
- if (windowSize >= 400 && windowSize < 800) {
- $('.carousel').css('width','300');
- }
- $(window).resize(function() {
- if( $(this).width() >= 1200 ) {
- $('.carousel').css('width','100%');
- }
- if( $(this).width() >= 800 && $(this).width() < 1200) {
- $('.carousel').css('width','400');
- }
- if( $(this).width() >= 400 && $(this).width() < 800) {
- $('.carousel').css('width','300');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement