javascript - How to "enhance" jQuery search with $(this)? -
i'm looping on children of div.
depending on whether children odd or have different following operations.
i want use jquery's $(this) current context , add query depending on state of being odd or even.
if child want child of div (so child of child loop). how can this?
my current method not work
$("div.profile_result").children().each(function(a){ // way of adding child doesn't work if (a%2) console.log( $($(this) + " > a")) else console.log("info") })
$($(this) + " > a")
trying concatenate object , string can't do.
use $(this).find('a')
instead
Comments
Post a Comment