remove html tags from a string using jquery
stackoverflow example: //SOURCE: http://stackoverflow.com/questions/8692423/remove-html-tags-from-a-string-using-jquery
JavaScript
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss$(function() {
// load string as object, wrapped in an outer container to use for search context
var o = $("<div>The email address you entered is already a CEB Club member. Please <span>login</span> using this account instead. If you forgot your password, please click <span>here</span>.</div>");
// sets the context to only look within o; otherwise, this will return all P tags
// var tags = $("SPAN", o);
var tags = o.find('SPAN')
tags.each(function(){
var tag = $(this); // get a jQuery object for the tag
// do something with the contents of the tag
alert(tag.text());
});
//SOURCE: http://stackoverflow.com/questions/8692423/remove-html-tags-from-a-string-using-jquery
});