Skip to content

Instantly share code, notes, and snippets.

@ryan5500
Created April 11, 2010 06:43
Show Gist options
  • Select an option

  • Save ryan5500/362553 to your computer and use it in GitHub Desktop.

Select an option

Save ryan5500/362553 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript'>
$(function() {
alert($('div').filter('.hide').text());
alert($('div').find('.hide').text());
});
</script>
</head>
<body>
<div class='hide'>this is div element</div>
<div>
<p class='hide'>this is p element(child of div)</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment