jquery - Referencing an element within a has()? -


if have following code:

 $('.object').has('span').each(function () {     $(this).// things each match.... }); 

is there easy way target span of $(this)?

something like

$(this + 'span').//do things span of current element 

i sure easy do, tried researching on google terms generic i'm struggling find reference!

target span of $(this)?

you can use find select descendant elements selector:

$(this).find("span") // or $("span", this) 

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 -

Function that returns a formatted array in VBA -