J'ai oublié l'idée de la fonction link que tu veux faire partir, tu peux faire ça:
<span id="toto">texteQuiVaDisparaitreSurClic</span>
avec ça :
1 2 3 4 5 6 7 8 9 10 11
| $('#toto').onclick(function (choix,id)
{
$.ajax({
type: "POST",
url: "<?php echo url_for('@configChemin') ?>",
data: "choix=" + choix + "&id=" + id,
success: function(html){
$('#sf_admin_content').html(html);
}
});
}); |
Ou si tu veux un truc qui soit générique mais qui marche quand même:
<span onclick="javascript: $.ajax({type: "POST", url: "<?php echo url_for('@configChemin') ?>", data: "choix=" + choix + "&id=" + id, success: function(html){$('#sf_admin_content').html(html);}});">texteQuiVaDisparaitreSurClic</span>
Partager