strippedHTML = function(element) {
    return $(element).wrap('<div></div>').parent().html().toString().replace(/(>)(\s*)(<)/g, "><");
  }
Test if a jquery element has the same HTML
as the given string.