- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How does $('iframe').ready() method work in jQuery?
Here’s an example wherein the iframe size is larger than the page. We will scroll to the top of the page whenever the iframe loads using jQuery −
Example
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $('iframe').ready(function(){ $(window).scrollTop(0); }); }); }); </script> </head> <body> <iframe frameborder="2" height="900" id="iframe" align="top" src="https://www.qries.com" width="900" ></iframe><br> <button>Loop through each image</button> </body> </html>
- Related Articles
- How and why does 'z'['toUpperCase']() in JavaScript work?
- How does JavaScript 'return' statement work?
- How does Selenium WebDriver's isDisplayed() method work?
- How does the 'in' operator work on a tuple in Python?
- How does Python's Matplotlib.pyplot.quiver exactly work?
- How does jQuery replaceWith() method work?
- How does jQuery.filter() method work in jQuery?
- How does jQuery.find() method work in jQuery?
- How does jQuery.eq() method work in jQuery?
- How does jQuery.map() method work in jQuery?
- How does jQuery.slice() method work in jQuery?
- How does jQuery.nextAll() method work in jQuery?
- How does jQuery.clone() method work in jQuery?
- Why addEventListener to 'select' element does not work in JavaScript?
- How to use wildcards like $ ('#name*'), $ ('#name%') in jQuery selectors?

Advertisements