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.

see in 1.5.2.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -