Show Elements when logging jQuery object in Chrome Dev Tools console?

后端 未结 5 1845
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 10:43

It seems like something has changed lately with Chrome Dev Tools. Logging a jQuery object with console.log used to show the Element of the DOM node in the conso

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 11:25

    Does this answer your question console.dir( element ) ..?


    Update:
    Dont do this

    console.dir( $("el") ); // Dont do this
    

    But use:

    console.dir( document.getElementById("el") ); // Do this
    

提交回复
热议问题