jQuery( document ).ready(function($) { // ajout d'un contains non sensible à la casse $.expr[":"].Contains = $.expr.createPseudo(function(arg) { return function( elem ) { return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; }); $(".measure-wrapper .measure-title").click(function() { $(this).next(".measure-content").slideToggle(500, "swing"); $(this).toggleClass("open"); }) /*** Rien à voir avec la choucroute : on déplace le chap commentaire en bas ****/ if ($( "#commentform" ).length ) { $('#commentform .comment-form-comment').insertBefore($('#commentform .comment-form-author')).show(); //Et on remplit le champ commentaire si il a été laissé vide $('#commentform #submit').click(function (){ if($('#commentform .comment-form-comment').val().length === 0) { $('#commentform .comment-form-comment textarea').val("Aucun commentaire"); } }); } });