ich mit einigem Code ein Problem habe ...TypeOf Problem mit jQuery-Code
Dies ist der Code:
(function($) {
$.fn.inc = function(url, transform, post, t) {
return this.length && url ? this.each(function() {
t = $(this);
$.ajax({
url: url,
success: function(txt, jqXHR, textStatus) {
t.html($.isFunction(transform) ? transform(txt, url) : txt);
$.isFunction(post) && post(url, jqXHR, textStatus);
}
});
}) : this;
};
$(function() {
$('[class*="inc:"]').each(function() {
var match = /inc:(\S+)/.exec(this.className || '');
if(typeOf(match[1]) != "undefined")
match && $(this).inc(unescape(match[1]));
});
});
})(jQuery);
und auf der Linie 18 ist es Punkt zu diesem Fehler:
ReferenceError: typeOf is not defined
if(typeOf(match[1]) != "undefined")
Was ist los mit dem Code?
Dieser Fehler weist auf:
TypeError: a is null
**return (a.ownerDocument || a) !== n && m(a), t(a, b)**
statt 'typeOf' sollte es sein' typeof' –