javascript - jQuery if iframe with class exists -


i trying detect if iframe specific class exists, not working me.

i need detect if iframe chat exists on site https://gaming.youtube.com 1 of scripts. weird in demo can detect iframe: http://jsfiddle.net/t7qmf/13/ when go live stream on https://gaming.youtube.com, can not detect if iframe chat exists.

when use $("iframe.class"); returns iframe, when try $("iframe.class").length; undefined.

i tried googling, saying use element.length, not working me. returns undefined when use $("iframe").length

here screen of console not working:

enter image description here

thanks.

because $ not jquery. in chrome dev console, when jquery not available, alias document.queryselector()


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -