I'm playing around with JS on the youtube-website (the trending page).
What i'm trying to do: Write all elements "ytd-video-renderer" with class "ytd-expanded-shelf-contents-renderer" into variable xyz.
My Code:
var xyz = $("ytd-video-renderer.ytd-expanded-shelf-contents-renderer")
Unfortunally this is my console-output:
<ytd-video-renderer class="style-scope ytd-expanded-shelf-contents-renderer">
i get only the first element from this site. If i'm using only vanilla JS
var xyz = document.querySelectorAll("ytd-video-renderer.ytd-expanded-shelf-contents-renderer")
I'll get all elements in an array. - fine..
But I want to use jQuery because I need to "scan" every element in this array for a certain childnode and find() will not work if I'm using querySelectorAll.
BTW: I'm using the console in Chrome and Firefox.