jquery - locate strong html (alone) inside div -


<div class='test'>   <strong> 1</strong> </div> 

i tried $(.test).find('strong') think not right way not not able locate element

am looking fetch html strong( value 1 alone , not text , other sections below .

what correct way ?

simple bad not getting right !!

you tried right way (except copy paste mistake - missing '')

$('.test').find('strong').html() 

demo: fiddle


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -