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 ;-) 
 
Post a Comment

Popular Posts