How to view other product photos without opening a new page!

How to view other product photos without opening a new page? When I want to view the second, third, and/or fourth photo it opens a new page when I open it. I want the other photos to preview without opening a new page.

Nevermind I fixed it