The method you can use to count the element’s of a jQuery selection is “size()”
$("div.class").size();
So you are able to do
if ($("div.class").size() > 0)
// Do something
else
// Another thing
or whatever you want to do
SmartImage is a free PHP class under LGPL licence.
With SmartImage you can easily:
It is really simple to use, for instance you can resize and image with 4 lines of code:
include "SmartImage.class.php";
$img = new SmartImage($src);
$img->resize(120, 80);
$img->saveImage("newimages/new07.jpg", 90);
More info here: SmartImage – CodiceFacile.it.