Dynamic resize images in mobile & desktop

 var ww = $("selector").width();
    //alert(ww);

    $("selector img").each(function () {
        var imgwidth = $(this).width();
        if (imgwidth > ww) {
            $(this).css('width', '100%');
            $(this).css('height', 'auto');
        }
    });

Comments

Popular posts from this blog

Scroll After Fixed Navigation

Bootstrap CSS Customize with SCSS CSS

Best way to prevent page scrolling on drag (mobile)