forked from DGNum/gestioCOF
sourcing get_thing in a js file
This commit is contained in:
parent
232b293052
commit
61a7f2df1e
4 changed files with 12 additions and 68 deletions
|
@ -1,10 +1,12 @@
|
|||
var STAT = {};
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// FONCTIONS
|
||||
// Permet de raffraichir un champ, étant donné :
|
||||
// thing_url : l'url contenant le contenu
|
||||
// thing_div : le div où le mettre
|
||||
// empty_... : le truc à dire si on a un contenu vide
|
||||
function get_thing(thing_url, thing_div, empty_thing_message) {
|
||||
STAT.get_thing = function(thing_url, thing_div, empty_thing_message) {
|
||||
$.get(thing_url, function(data) {
|
||||
if(jQuery.trim(data).length==0) {
|
||||
thing_div.html(empty_thing_message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue