Using javascript/jQuery to get attribute values from an HTML string