pour lancer une mediabox ou modalbox, il faut passer en js, donc on

intercepte l'event sur a.mediabox ou a.modalbox
This commit is contained in:
Christophe 2020-03-12 11:37:53 +01:00
parent 1ab4f58802
commit 8a05651fb2
2 changed files with 26 additions and 0 deletions

View file

@ -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 {

View file

@ -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) {