Skip to content

Instantly share code, notes, and snippets.

@benedmunds benedmunds/Result forked from anonymous/Result
Created Apr 11, 2014

Embed
What would you like to do?
<div class="foo bar"></div>
<div class="foo raa"></div>
<ul id="container">
<li>
<div class="foo bar"></div>
<div class="foo bar"></div>
<div class="foo bar"></div>
</li>
<li>
<div class="foo raa"></div>
<div class="foo raa"></div>
<div class="foo raa"></div>
</li>
</ul>
<script>
$(document).ready(function(){
$('ul#container li').each(function(){
$(this).find('.foo').hide();
$(this).find('.foo:first').show();
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.