jQuery – Filter image by size

    [javascript]
    $(‘.mydiv img’).each(function() {
    var imgwidth = $(this).width();

    if (imgwidth < 150) {
    $(this).hide();
    } else {
    $(this).show();
    }
    });
    [/javascript]

    Leave a Reply