Problem Statement: Write a pure javascript solution with a file name "[login to view URL]", and place it in the home directory of [login to view URL] "[login to view URL]" in index.html. The "[login to view URL]" must do as illustrated in the screenshot named "[login to view URL]":The [login to view URL] should be written in such a way that, it should work in any website wherever it is [login to view URL], should satisfy the following conditions:
1. It must get the first N images ( for this solution, take N=2) which have width>=500px and height>=150px
2. For each image, it must create a div container first with the image's width and height, in the bottom center of image
3. Within, div containers it must create iframe with the image's width and height
4. Background color of iframe’s body must be red color
5. Iframe should not have any borders, scrollbars etc.
6. On resize of responsive images, the div containers must resize, and in turn the iframes too, to match the images dimensions
7. On clicking on any iframe, it's body’s background color must change to blue
8. The width and height of div container and iframe should actually reflect in their DOM
I have a deep knowledge in this field. This is what I work most of the time at my job. I know very well what should be done here.
Hope to hear back from you!
Regards,
Flaviu