How do I select sibling node of the current node? Here is the snippet:
<div id="main">
<a class="test" href="test.html">Hello</a>
<div>Some text</div>
</div>
//script
$(".test").click(function() { $("this:parent > div").toggle(); });
or
$(".test").click(function() { $("this ~ div").toggle(); });
None of these works. I know I can access current object using $(this) but in this case I don't know how.