Open dcjamal opened 7 years ago
Hello,
i have created a modal which load via ajax content and its works fine, but now i want a navigation inside the popup where one can navigate to next or previous item. The Navigation has a data-post-id from the next and prev post.
``` <a href="#" data-post-id="<?php echo $prev_post->ID; ?>"class="prev-ajax"><i class="fa fa-arrow-circle-left"></i></a> <a href="#" data-post-id="<?php echo $next_post->ID; ?>" class="next-ajax"><i class="fa fa-arrow-circle-right"></i></a>
function popup( id ) { $( '.portfolio-container' ).magnificPopup( { delegate: 'article', // child items selector, by clicking on it popup will open type: 'ajax', midClick: true, removalDelay: 300, position: true, ajax: { settings: { type: "POST", url: rpLocalize.ajaxUrl, data: { action: 'rp_ajax_project_modal', id: id }, } }, callbacks: { parseAjax: function ( mfpResponse ) { console.log( 'Ajax content loaded:', mfpResponse ); }, ajaxContentAdded: function () { console.log( this.content ); } } } ); }
Any solution?
Hello,
i have created a modal which load via ajax content and its works fine, but now i want a navigation inside the popup where one can navigate to next or previous item. The Navigation has a data-post-id from the next and prev post.