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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -