$("img").load(function(){
var width = $(this).width();
var height = $(this).height();
if (width * height > 40000) {
}});
I have this code, and I want to highlight an image that is larger than 40,000 pixels and if it is not inside a table. I know that using has() only gets descendants. would using load(function() be incorrect here?
If you just want to select elements, you could use selectors:
Of course, you ought to be asking, wtf is
:area(40000)?Here you go:
With a little more time you could extend the custom selector to take a second param so that you could use
>,<,==, etc in a:area(40000,lt)style syntax.