Friday, April 22, 2011

Fix for - jQuery Error on IE 8.0 for append function.

While using append() function in jQuery, you may see some errors popping out while loading the page.
This issue usually happens in Internet Explorer 8.0 version and will work perfectly in Firefox. 
 
jQuery Function: 
append: function() {
 return this.domManip(arguments, true, function(elem){
  if (this.nodeType == 1)
        this.appendChild( elem )  });
 },
Replace the append function with the below code,
append: function() {
  return this.domManip(arguments, true, function(elem){
   if (this.nodeType == 1)
           try{this.appendChild( elem )}
           catch(err){ }
  });
 },
 
Hope this will help you ;-) 
 

4 comments:

Anonymous said...

Thanks Mate, you save my life.

Anonymous said...

Same issue, this solution worked like a charm. Thanks!

Unknown said...

Gracias ,estube buscando la solucion por dias .

Aravind NC said...

@Enoc Espinosa - eres bienvenido...

Popular Posts