If I want to select every image which it\'s alt is Home for example, I can do something like this:
$(\"img[alt=\'Home\']\")
But how can I s
var $images = $("img").filter(function() {
return $(this).css('width') == '750px';
});
EDIT: There is no plugin I am aware of, or any plans to include such specific functionality. You can easily pluginify it yourself, such as (untested):
$.fn.filterByWidth = function(width) {
var $images = $("img").filter(function() {
return $(this).css('width') == width;
});
return $images;
};
Usage:
$images = $('#div img').filterByWidth('750px');
$images = $('#div img').filterByWidth('50%');
...etc...