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

后端 未结 5 1830
被撕碎了的回忆
被撕碎了的回忆 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:33

    I've found this helpful:

    console.log.apply(console, $("a"));
    

    Also, if you run console.log = inspect; from inside the console, things will output the old way, but it doesn't work if you just do it from your code, it has to be from the console.

提交回复
热议问题