Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (21 sloc) 626 Bytes
<!doctype html>
<html lang="en">
<title>JavaScript Patterns</title>
<meta charset="utf-8">
/* Title: context and find
* Description: better to choose `find` over `context`
var arms = $('div.robotarm', '#container');
$('.reply_form', $(this).closest('.comment')).hide();
// no performance gain over doing this, but a preferred pattern for readability reason
var arms = $('#container').find('div.robotarm');
// References