Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 393 Bytes
<!doctype html>
<html lang="en">
<head>
<title>JavaScript Patterns</title>
<meta charset="utf-8">
</head>
<body>
<script>
/* Title: data
* Description: pattern and antipattern of using data
*/
// antipattern
$(elem).data(key, value);
// preferred
$.data(elem, key, value);
// References
// http://paulirish.com/2009/perf/
</script>
</body>
</html>