jQuery - Filter image by size

Javascript 1 มิ.ย. 2012


$('.mydiv img').each(function() {
var imgwidth = $(this).width();

if (imgwidth < 150) { $(this).hide(); } else { $(this).show(); } });

แท็ก

Onyx

Just a middle-aged programmer, Can do many things but not the most.