Use fancybox rel=“group” more than one time in same page its not working properly
I have a list of articles and each article have a link "See full article".
When user clicks in this link it will open a fancybox with all article content.
And I want to navigate between news so Im using "rel="group" in my link, and it is working fine If I just have one rel="group".
But I have two design versions one for desktop and one for mobile, and Im couting my chars differently depending on wich version is. And in each version Im using "rel=group", so I use "rel=group" two times, because I want to navigate between my news also in mobile.
But using "rel=group" two times its not working correctly, when I click in my arrow to change for next news I get again my current news and when I click again i get the same result, onlt at third click I get my next news inside fancybox.
Do you know why this can be happening?
- echo '<article class="news">';
- echo '<p class="desktop">'.lmt_words($result['content'],370).'<a id="'.$result['id_news'].'" class="fancybox" href="#window_fancybox'.$result['id_news'].'" rel="group">
- See full article</a>
- </p>';
- echo '<p class="mobile">'.lmt_words($result['content'],170).'<a id="'.$result['id_news'].'" class="fancybox" href="#window_fancybox'.$result['id_news'].'" rel="group">
- See full article</a>
- </p>';
- echo '<div id="window_fancybox-container" class="modal_container">';
- echo '<div id="window_fancybox'.$result['id_news'].'" class="modal" >';
- //inside here I show all my article content
- echo '</div>';
- echo '</div>';
- echo '</article>';