There is a difference between a child and a brother. In the example below, all <li>are children <ul>. Each <li>is a child of all the other elements <li>, since they are at the same level in the DOM tree.
<ul class="parent">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>
You should use .children()as described here http://api.jquery.com/children/ .
$("."+styleTarget).children().get(0).tagName
source
share