Answer the question
In order to leave comments, you need to log in
How to write conditions for the existence of a DOM element in JS?
There is a structure like this:
<div id="block">
<div>
<iframe>
#document
<html>
<body>
<iframe></iframe> <!-- вот этот iframe -->
</body>
</html>
</iframe>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
if($('#block body iframe').length)
alert('exists');
//также last() метод есть )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question