Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 512 Bytes
<!doctype html>
<html lang="en">
<title>JavaScript Patterns</title>
<meta charset="utf-8">
/* Title: Decending from id
* Description: be more specific, better to descend from an id
// antipattern
var arms = $('.container div.robotarm');
// better
var arms = $('#container div.robotarm');
// preferred
var arms = $('#container').find('div.robotarm');
// References