//$(document).ready(function() { // Attention dans wordpress, on ne déclare pas jquery avec $ mais avec JQuery, pour des questions de compatibilité avec d'autres modules jQuery(document).ready(function() { jQuery(document).on("click",".comment_author",function(){ var url = "http://www.decoration-mariage.eu/wp-content/plugins/wprog/php/aj-liste-comment.php"; var author_email = jQuery(this).data("author_email"); //Ca bloque ici //var author_email = jQuery(".comment_author").data("author_email"); //TEST only mais marche pas non plus var author = jQuery(this).data("author"); //Faire un appel ajax ensuite ici... retour = author_email + ' : ' + author ; //alert(retour); jQuery.ajax({ type: "POST", url: url, data: 'author_email='+author_email+'&author='+author, success: function(retour){ //jQuery('#result_comments_author-'+author_email).html(retour); //LA concatenation en fonctionne pas très bien jQuery('.result_comments_author').html(retour); } }); return false; }); });//End jquery /* function devloungePluginSeriesClick(evt) { //var url = "http://www.decoration-mariage.eu/wp-content/plugins/devlounge-plugin-series/php/dl-plugin-ajax.php"; var url = "http://www.decoration-mariage.eu/wp-content/plugins/wprog/php/aj-liste-comment.php"; var success = function(t){devloungePluginSeriesClickComplete(t);} var myAjax = new Ajax.Request(url, {method:'post', onSuccess:success}); return false; } function devloungePluginSeriesClickComplete(t) { alert(t.responseText); } */