1. delete the blank before and after tag
$("[id=single-dropdown]").attr("innerHTML").replace(/^\s+/ ,'').replace(/\s+$/ ,'').replace(/>\s+</g ,"><");
red : delete the before blank
yellow: delete the blank from the end
green: delete the blank between ">" and "<"
hope this work for you!