'nodeType' is null or not an object, IE (all), jquery 1.2.6
hi,
i get the following error on IE (6,7,8) with jquery 1.2.6:
"'nodeType' is null or not an object"
it seems to happen when cloning the object.
no errors on firefox.
maybe (still) a bug?
found this info:
http://groups.google.com/group/jquery-dev/browse_thread/thread/020197b99694915f
CODE Snippet:
//remove current properties-div, if minus-symbol was clicked
//add new properties-div with default values, if plus-symbol was
clicked
$("#properties > div a img").mouseup(function(e){
var i = $("#properties div a img").index(this); //index of clicked
image
var div_i; //index of div-element
var add = 1;
var last = true;
if(i%2 == 0)
{ //minus clicked => remove clicked div-element; if it is the last
element, then just reset fields to default value.
div_i = i/2;
if($("#properties > div").size() > 1)
{
$("#properties > div:nth-child("+(div_i+add)+")").remove();
last = false;
}
}
else
{ //plus clicked => append div-element after clicked div-element
div_i = (i-1)/2;
$("#properties > div:nth-child("+(div_i+add)+")").clone
(true).insertAfter("#properties > div:nth-child("+(div_i+1)+")");
add++;
}
if(i%2 == 0 && last || i%2 != 0)
{
$("#properties > div:nth-child("+(div_i+add)+")").css
("display","none");
$("#properties > div:nth-child("+(div_i+add)+") input
[name^=propertyName]").val("");
$("#properties > div:nth-child("+(div_i+add)+") *
[name^=propertyValue]").replaceWith("<input type=\"text\" name=
\"propertyValue[]\" class=\"inputText\" style=\"width:83px;\" value=
\"\" maxlength=\"254\" />");
$("#properties > div:nth-child("+(div_i+add)+") select option")
[0].selected = true;
$("#properties > div:nth-child("+(div_i+add)+")").css
("display","block");
}
return false;
});