replace .html() with .replaceWith in Preferences btn-group Javascript code