javascript - Why are .innerHTML problems not an issue when using JQuery().html()? -
i worked out single instance of document.getelementbyid("myid").innerhtml = "a value" in this javascript world clock guide causes wordpress admin not load , breaks various areas of wordpress admin interface.
i solved replacing each instance jquery("#myid").html("a value")) appears work fine. causing .innerhtml fail miserably not jquery().html()?
this pertinent part of jquery source:
try { ( var = 0, l = this.length; < l; i++ ) { // remove element nodes , prevent memory leaks if ( this[i].nodetype === 1 ) { jquery.cleandata( this[i].getelementsbytagname("*") ); this[i].innerhtml = value; } } // if using innerhtml throws exception, use fallback method } catch(e) { this.empty().append( value ); } note handles exceptions thrown.
Comments
Post a Comment