Skip to content

Instantly share code, notes, and snippets.

@kaesetoast
Created June 3, 2015 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaesetoast/a56c2bdde4754d9f7e54 to your computer and use it in GitHub Desktop.
Save kaesetoast/a56c2bdde4754d9f7e54 to your computer and use it in GitHub Desktop.
$('.js-popup-link').each(function(){
var url = $(this).attr('href');
url += (url.split('?')[1] ? '&':'?') + 'type=103';
$(this).attr('data-mfp-src', url);
});
$('.js-popup-link').magnificPopup({
type: 'ajax',
callbacks: {
parseAjax: function(response) {
response.data = '<div class="ajax-wrapper">' + response.data + '</div>';
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment