jquery - How do I combine 'this' with a first-child selector? -


i'm trying combine 'this' div:first-child html value of hidden div makes body of anchor tag. how should work?

$('a').click( function(){   $(this + "div:first-child").html(); } 

try out:

$('a').click( function(){   $("div:first-child", this).html(); } 

it selects html of "div:first-child" inside of link


Comments