The Magnific Popup Plugin Does Not Stick to the Child Items?

The Magnific Popup Plugin Does Not Stick to the Child Items?

For Example:
  1. Thread ID: 35
  2. <h1>Title</h1>
  3. <p>Caption</p>
  4. <div class='parent-container'>
  5. 1. <img src=""/>
  6. 2. <img src=""/>
  7. 3. <img src=""/>
  8. </div>
  9. Thread ID: 36
  10. <h1>Title</h1>
  11. <p>Caption</p>
  12. <div class='parent-container'>
  13. 1. <img src=""/>
  14. 2. <img src=""/>
  15. </div>

It shows "1 of 5", "2 of 5", etc.

I have used the following for Magnific Popup:

  1.     $('.parent-container').magnificPopup({
            delegate: 'a', // child items selector, by clicking on it popup will open
            type: 'image',
            gallery:{enabled:true}
            // other options
        });

Any suggestions, why this happens?


If you need something specifically, please let me know.