jQuery value within div undefined

When I query my page in the console,  I get back the innerhtml.  However, when I try to do this in a routine, the value I get back is undefined.

The code follows:
$('.testimonial').each (function() {
					var el = this;
					var rawhtml=el.innerhtml;
					el.innerhtml = CleanHTMLBody(rawhtml);					
				});

Open in new window


I can see "el" in the console has a div, but the innerhtml assignment fails and rawhtml is undefined.

Please advise.
LVL 1
Howard BashSenior Software EngineerAsked:
Who is Participating?
 
PawełConnect With a Mentor SharePoint DeveloperCommented:
try el.innerHTML

instead of
el.innerhtml

http://www.w3schools.com/jsref/prop_html_innerhtml.asp
0
 
Julian HansenCommented:
If you are using jQuery why are you using innerHTML
What does CleanHTMLBody do?
$('.testimonial').each (function(i, el) {
  var html = CleanHTMLBody($(e).html());
   $(e).html(html);
});

Open in new window

0
 
Howard BashSenior Software EngineerAuthor Commented:
Duh.  Thanks.  It was a case of wrong case. ;-)
0
All Courses

From novice to tech pro — start learning today.