I want to display the following text for the tag. How do I escape the single quotes for the following?
$(\"#spn_err\").text($(\'#tx
$("#spn_err").text("'" + $('#txt1').attr('value') + "' is not valid");