llimllib / pixastic forked from jseidelin/pixastic

JavaScript Image Processing Library *This is an unofficial fork by me! Go get the official source at pixastic.com if you want the actual pixastic source.

pixastic / pixastic.jquery.js
100755 23 lines (20 sloc) 0.462 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if (typeof jQuery != "undefined" && jQuery && jQuery.fn) {
jQuery.fn.pixastic = function(action, options) {
var newElements = [];
this.each(
function () {
if (this.tagName == "IMG" && !this.complete) {
return;
}
var res = Pixastic.process(this, action, options);
if (res) {
newElements.push(res);
}
}
);
if (newElements.length > 0)
return jQuery(newElements);
else
return this;
};
 
};