petite simplification du js

This commit is contained in:
Christophe 2020-03-11 10:10:41 +01:00
parent f5138c41e5
commit e32e49c353
2 changed files with 20 additions and 28 deletions

View file

@ -1,19 +1,15 @@
jQuery(function() {
gamutable();
//onAjaxLoad(gamutable);
function gamutable() {
$('#app').on('click', '.url_action', function(e) {
e.preventDefault();
e.stopPropagation();
let url = $(this).attr('href');
$.ajax({
url: url,
async: true
}).done(function() {
app.rechargerJson();
});
$('#app').on('click', '.url_action', function(e) {
e.preventDefault();
e.stopPropagation();
let url = $(this).attr('href');
$.ajax({
url: url,
async: true
}).done(function() {
app.rechargerJson();
});
}
});
});
function recupJson(d) {
try {

View file

@ -9,21 +9,17 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
jQuery(function () {
gamutable(); //onAjaxLoad(gamutable);
function gamutable() {
$('#app').on('click', '.url_action', function (e) {
e.preventDefault();
e.stopPropagation();
var url = $(this).attr('href');
$.ajax({
url: url,
async: true
}).done(function () {
app.rechargerJson();
});
$('#app').on('click', '.url_action', function (e) {
e.preventDefault();
e.stopPropagation();
var url = $(this).attr('href');
$.ajax({
url: url,
async: true
}).done(function () {
app.rechargerJson();
});
}
});
});
function recupJson(d) {