User:Darklama/test.js

function glossary { $('div.glossary > dt').each( function {   var dt = $(this), id = dt.children(':first-child').text.replace(/^\s+|\s+$/, "").replace(/\s+/g, "_");    dt.before('');  } }

$(document).ready(glossary);