diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 25ae577..c0fc0c0 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -10,6 +10,19 @@ jQuery(function() { app.rechargerJson(); }); }); + + $('#app').on('click', '.modalbox', function(e) { + e.preventDefault(); + let url = $(this).attr('href'); + url += '&var_zajax=content'; + $.modalbox(url); + }); + + $('#app').on('click', '.mediabox', function(e) { + e.preventDefault(); + let href = $(this).attr('href'); + $.fn.mediabox({ href }); + }); }); function recupJson(d) { try { diff --git a/js/gamutable.js b/js/gamutable.js index a6b19fc..ac571e7 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -20,6 +20,19 @@ jQuery(function () { app.rechargerJson(); }); }); + $('#app').on('click', '.modalbox', function (e) { + e.preventDefault(); + var url = $(this).attr('href'); + url += '&var_zajax=content'; + $.modalbox(url); + }); + $('#app').on('click', '.mediabox', function (e) { + e.preventDefault(); + var href = $(this).attr('href'); + $.fn.mediabox({ + href: href + }); + }); }); function recupJson(d) {