BubikolRamios
06-22-2012, 05:27 AM
This works, purpose = avoid spaces
function nextObject(obj)
{
var nextS=obj.nextSibling;
while(nextS.nodeType!=1)
{
nextS=nextS.nextSibling;
}
return nextS;
}
In prototype form:
Element.prototype.nextObject = function()
{
var nextS=this.nextSibling;
while(nextS.nodeType!=1)
{
nextS=nextS.nextSibling;
}
return nextS;
}
...parentNode.nextObject...
I get 'is not a function'
?
function nextObject(obj)
{
var nextS=obj.nextSibling;
while(nextS.nodeType!=1)
{
nextS=nextS.nextSibling;
}
return nextS;
}
In prototype form:
Element.prototype.nextObject = function()
{
var nextS=this.nextSibling;
while(nextS.nodeType!=1)
{
nextS=nextS.nextSibling;
}
return nextS;
}
...parentNode.nextObject...
I get 'is not a function'
?