Skip to content Skip to sidebar Skip to footer

How To Hide Elements On Screen Size?

I'm using this plugin to swap my images on responsive for 3 screen are: desktop,tablet and mobil and I'm using bootstrap carousel with this plugin together. so I have 3 screen reso

Solution 1:

You can implement like following

 $( window ).resize(function() {
         if($(window).width() < 600) { // set desired width condition
             $.each($(".carousel-inner img"), function(){
                   if($(this).attr("data-small") == "")
                      $(this).fadeOut("slow");
             })
         }
    });

Post a Comment for "How To Hide Elements On Screen Size?"