javascript - how to get inner HTML with jquery 2.0? -


this code (jquery 2.0.3):

alert($('<p>test <b>me</b></p>').filter('p').get(0).html()); 

chrome says:

cannot call method 'html' of undefined  

what's wrong?

btw, i'm expecting test <b>me</b>.

ps. problem i'm running xslt, not html. answers.

remove .get(0) method.

http://jsfiddle.net/nmhqw/

alert($('<p>test <b>me</b></p>').filter('p').html()); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -